From 79f76cd8df535587074f74916fa853097025f4a7 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Wed, 29 Dec 2021 09:32:15 +0530 Subject: [PATCH] fish: fix cross compile --- pkgs/shells/fish/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix index e0ab463b4180..622521781c1b 100644 --- a/pkgs/shells/fish/default.nix +++ b/pkgs/shells/fish/default.nix @@ -186,6 +186,7 @@ let nativeBuildInputs = [ cmake + gettext ]; buildInputs = [ @@ -200,8 +201,14 @@ let "-DMAC_CODESIGN_ID=OFF" ]; + # The optional string is kind of an inelegant way to get fish to cross compile. + # Fish needs coreutils as a runtime dependency, and it gets put into + # CMAKE_PREFIX_PATH, which cmake uses to look up build time programs, so it + # was clobbering the PATH. It probably needs to be fixed at a lower level. preConfigure = '' patchShebangs ./build_tools/git_version_gen.sh + '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + export CMAKE_PREFIX_PATH= ''; # Required binaries during execution