diff options
author | OPNA2608 <christoph.neidahl@gmail.com> | 2023-07-12 08:47:25 +0200 |
---|---|---|
committer | OPNA2608 <christoph.neidahl@gmail.com> | 2023-07-12 08:47:25 +0200 |
commit | 609c49f7406d0d44fabebf5eb6cd145faff52eab (patch) | |
tree | f0af877fe33127dcad3975e885cd71ca8a422907 /pkgs/desktops | |
parent | 983e3f7d18f4b1f6b40fe6a754cae8a426d90234 (diff) | |
download | nixlib-609c49f7406d0d44fabebf5eb6cd145faff52eab.tar nixlib-609c49f7406d0d44fabebf5eb6cd145faff52eab.tar.gz nixlib-609c49f7406d0d44fabebf5eb6cd145faff52eab.tar.bz2 nixlib-609c49f7406d0d44fabebf5eb6cd145faff52eab.tar.lz nixlib-609c49f7406d0d44fabebf5eb6cd145faff52eab.tar.xz nixlib-609c49f7406d0d44fabebf5eb6cd145faff52eab.tar.zst nixlib-609c49f7406d0d44fabebf5eb6cd145faff52eab.zip |
lomiri.geonames: Use CMAKE_CROSSCOMPILING_EMULATOR instead of patching in emulator call
Diffstat (limited to 'pkgs/desktops')
-rw-r--r-- | pkgs/desktops/lomiri/development/geonames/default.nix | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/desktops/lomiri/development/geonames/default.nix b/pkgs/desktops/lomiri/development/geonames/default.nix index c4e327caf93f..534ed28e106e 100644 --- a/pkgs/desktops/lomiri/development/geonames/default.nix +++ b/pkgs/desktops/lomiri/development/geonames/default.nix @@ -45,10 +45,6 @@ stdenv.mkDerivation (finalAttrs: { --replace "\''${CMAKE_INSTALL_DATADIR}/gtk-doc/html/\''${PROJECT_NAME}" "\''${CMAKE_INSTALL_DOCDIR}" substituteInPlace demo/CMakeLists.txt \ --replace 'RUNTIME DESTINATION bin' 'RUNTIME DESTINATION ''${CMAKE_INSTALL_BINDIR}' - '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' - # Built for hostPlatform, executed during build - substituteInPlace src/CMakeLists.txt \ - --replace 'COMMAND mkdb' 'COMMAND ${stdenv.hostPlatform.emulator buildPackages} mkdb' ''; strictDeps = true; @@ -87,6 +83,9 @@ stdenv.mkDerivation (finalAttrs: { "-DWANT_TESTS=${lib.boolToString finalAttrs.doCheck}" # Keeps finding & using glib-compile-resources from buildInputs otherwise "-DCMAKE_PROGRAM_PATH=${lib.makeBinPath [ buildPackages.glib.dev ]}" + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + # only for cross without native execute support because the canExecute "emulator" call has a format that I can't get CMake to accept + "-DCMAKE_CROSSCOMPILING_EMULATOR=${stdenv.hostPlatform.emulator buildPackages}" ]; preInstall = lib.optionalString withDocumentation '' |