summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorAaron Janse <aaron@ajanse.me>2020-08-10 19:52:54 -0700
committerAaron Janse <aaron@ajanse.me>2020-08-10 19:52:54 -0700
commiteb970b6241d230213d5e30c92916443a2a0f410f (patch)
treea7c722f66edec6a7619ce27426e7bf81f77eaf26 /pkgs/stdenv
parent64a9b4b7a341c7f423932bf8f4366f07654060e6 (diff)
downloadnixpkgs-eb970b6241d230213d5e30c92916443a2a0f410f.tar
nixpkgs-eb970b6241d230213d5e30c92916443a2a0f410f.tar.gz
nixpkgs-eb970b6241d230213d5e30c92916443a2a0f410f.tar.bz2
nixpkgs-eb970b6241d230213d5e30c92916443a2a0f410f.tar.lz
nixpkgs-eb970b6241d230213d5e30c92916443a2a0f410f.tar.xz
nixpkgs-eb970b6241d230213d5e30c92916443a2a0f410f.tar.zst
nixpkgs-eb970b6241d230213d5e30c92916443a2a0f410f.zip
mkDerivation: handle Redox in cmakeFlags
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/generic/make-derivation.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix
index 993ae68e9e8..5b1c380548f 100644
--- a/pkgs/stdenv/generic/make-derivation.nix
+++ b/pkgs/stdenv/generic/make-derivation.nix
@@ -247,7 +247,8 @@ in rec {
             (/**/ if lib.isString cmakeFlags then [cmakeFlags]
              else if cmakeFlags == null      then []
              else                                     cmakeFlags)
-          ++ [ "-DCMAKE_SYSTEM_NAME=${lib.findFirst lib.isString "Generic" [ stdenv.hostPlatform.uname.system ]}" ]
+          ++ [ "-DCMAKE_SYSTEM_NAME=${lib.findFirst lib.isString "Generic" (
+               lib.optional (!stdenv.hostPlatform.isRedox) stdenv.hostPlatform.uname.system)}"]
           ++ lib.optional (stdenv.hostPlatform.uname.processor != null) "-DCMAKE_SYSTEM_PROCESSOR=${stdenv.hostPlatform.uname.processor}"
           ++ lib.optional (stdenv.hostPlatform.uname.release != null) "-DCMAKE_SYSTEM_VERSION=${stdenv.hostPlatform.release}"
           ++ lib.optional (stdenv.buildPlatform.uname.system != null) "-DCMAKE_HOST_SYSTEM_NAME=${stdenv.buildPlatform.uname.system}"