Skip to content

Instantly share code, notes, and snippets.

@pveierland
Last active February 12, 2023 15:21
Show Gist options
  • Save pveierland/47c837ae772e7104d73e8a7aaa0f17d7 to your computer and use it in GitHub Desktop.
Save pveierland/47c837ae772e7104d73e8a7aaa0f17d7 to your computer and use it in GitHub Desktop.
{ cmake
, fetchFromGitHub
, pkg-config
, stdenv
, wxGTK31
}:
let
wxGTK = wxGTK31;
in
stdenv.mkDerivation (finalAttrs: rec {
pname = "nrel-lk";
version = "d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4";
src = fetchFromGitHub {
owner = "NREL";
repo = "lk";
rev = version;
sha256 = "sha256-HuPNOOhq+okIPqXM2LtOxZKd4geirraoOJzGdmLUj0c=";
};
buildInputs = [ cmake pkg-config wxGTK ];
})
❯ nix-build -E 'with import /home/pveierland/dev/nixpkgs {}; callPackage ./default.nix {}'
this derivation will be built:
/nix/store/wc9p6fdvwh5n0b20icig15vz13j3r23m-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4.drv
building '/nix/store/wc9p6fdvwh5n0b20icig15vz13j3r23m-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4.drv'...
unpacking sources
unpacking source archive /nix/store/p2wvqig58azxk3bd7wda7vq9h0myla6f-source
source root is source
patching sources
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4/share/doc/lk -DCMAKE_INSTALL_INFODIR=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4/include -DCMAKE_INSTALL_SBINDIR=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/1y8i61anhs9hh1g5x3zw2fvdbivwixzg-gcc-wrapper-11.3.0/bin/strip -DCMAKE_RANLIB=/nix/store/1y8i61anhs9hh1g5x3zw2fvdbivwixzg-gcc-wrapper-11.3.0/bin/ranlib -DCMAKE_AR=/nix/store/1y8i61anhs9hh1g5x3zw2fvdbivwixzg-gcc-wrapper-11.3.0/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/snry2127327x7v6x7rjydmipznfgq2pa-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/1y8i61anhs9hh1g5x3zw2fvdbivwixzg-gcc-wrapper-11.3.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/1y8i61anhs9hh1g5x3zw2fvdbivwixzg-gcc-wrapper-11.3.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /nix/store/91inqf4np32q02gzma2p5mgbi4rpx2vx-cmake-3.24.3/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
wxWidgets_INCLUDE_DIRS)
Call Stack (most recent call first):
/nix/store/91inqf4np32q02gzma2p5mgbi4rpx2vx-cmake-3.24.3/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/nix/store/91inqf4np32q02gzma2p5mgbi4rpx2vx-cmake-3.24.3/share/cmake-3.24/Modules/FindwxWidgets.cmake:977 (find_package_handle_standard_args)
CMakeLists.txt:88 (find_package)
-- Configuring incomplete, errors occurred!
See also "/build/source/build/CMakeFiles/CMakeOutput.log".
error: builder for '/nix/store/wc9p6fdvwh5n0b20icig15vz13j3r23m-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4.drv' failed with exit code 1;
last 10 log lines:
> Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
> wxWidgets_INCLUDE_DIRS)
> Call Stack (most recent call first):
> /nix/store/91inqf4np32q02gzma2p5mgbi4rpx2vx-cmake-3.24.3/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
> /nix/store/91inqf4np32q02gzma2p5mgbi4rpx2vx-cmake-3.24.3/share/cmake-3.24/Modules/FindwxWidgets.cmake:977 (find_package_handle_standard_args)
> CMakeLists.txt:88 (find_package)
>
>
> -- Configuring incomplete, errors occurred!
> See also "/build/source/build/CMakeFiles/CMakeOutput.log".
For full logs, run 'nix log /nix/store/wc9p6fdvwh5n0b20icig15vz13j3r23m-nrel-lk-d5f55ff2ececa3d7e3c8f85dd1431ebfd18b82e4.drv'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment