git.iko.soy/typeable/nixpkgs
on master help sign in
stdenv: correct cross CMAKE_SYSTEM_NAME

As described in cmake cross instructions, CMAKE_SYSTEM_NAME should be set to "Generic" if there is no applicable OS: https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling#setting-up-the-system-and-toolchain

commit8cedc7fc6cca524fa3f27d5b70774aad8b4c67ee authorarcnmx <arcnmx@users.noreply.github.com> dateSat 27 Jul 2019, 15:18 (7 years ago) parentb5590ff
1 file changed+1−1
pkgs/stdenv/generic/make-derivation.nix+1−1
pkgs/stdenv/generic/make-derivation.nix+1−1
@@ -246,7 +246,7 @@ in rec {
246246 (/**/ if lib.isString cmakeFlags then [cmakeFlags]
247247 else if cmakeFlags == null then []
248248 else cmakeFlags)
249− ++ lib.optional (stdenv.hostPlatform.uname.system != null) "-DCMAKE_SYSTEM_NAME=${stdenv.hostPlatform.uname.system}"
249+ ++ [ "-DCMAKE_SYSTEM_NAME=${lib.findFirst lib.isString "Generic" [ stdenv.hostPlatform.uname.system ]}" ]
250250 ++ lib.optional (stdenv.hostPlatform.uname.processor != null) "-DCMAKE_SYSTEM_PROCESSOR=${stdenv.hostPlatform.uname.processor}"
251251 ++ lib.optional (stdenv.hostPlatform.uname.release != null) "-DCMAKE_SYSTEM_VERSION=${stdenv.hostPlatform.release}"
252252 ++ lib.optional (stdenv.buildPlatform.uname.system != null) "-DCMAKE_HOST_SYSTEM_NAME=${stdenv.buildPlatform.uname.system}"