diff options
Diffstat (limited to 'pkgs/tools/package-management/nix/common.nix')
-rw-r--r-- | pkgs/tools/package-management/nix/common.nix | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index a6f9f3c5b594..c26cb410399d 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -76,7 +76,7 @@ in , xz , enableDocumentation ? stdenv.buildPlatform.canExecute stdenv.hostPlatform , enableStatic ? stdenv.hostPlatform.isStatic -, withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp +, withAWS ? !enableStatic && (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin), aws-sdk-cpp , withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp, libseccomp , confDir @@ -101,7 +101,7 @@ self = stdenv.mkDerivation { [ "out" "dev" ] ++ lib.optionals enableDocumentation [ "man" "doc" ]; - hardeningEnable = lib.optionals (!stdenv.isDarwin) [ "pie" ]; + hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ]; hardeningDisable = [ "shadowstack" @@ -126,7 +126,7 @@ self = stdenv.mkDerivation { mdbook ] ++ lib.optionals (atLeast213 && enableDocumentation) [ mdbook-linkcheck - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linuxMinimal ]; @@ -147,9 +147,9 @@ self = stdenv.mkDerivation { libgit2 ] ++ lib.optionals (atLeast224 || lib.versionAtLeast version "pre20240626") [ toml11 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security - ] ++ lib.optionals (stdenv.isx86_64) [ + ] ++ lib.optionals (stdenv.hostPlatform.isx86_64) [ libcpuid ] ++ lib.optionals atLeast214 [ rapidcheck @@ -177,7 +177,7 @@ self = stdenv.mkDerivation { mkdir -p $out/lib cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib rm -f $out/lib/*.a - ${lib.optionalString stdenv.isLinux '' + ${lib.optionalString stdenv.hostPlatform.isLinux '' chmod u+w $out/lib/*.so.* patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.* ''} @@ -206,9 +206,9 @@ self = stdenv.mkDerivation { "--enable-gc" ] ++ lib.optionals (!enableDocumentation) [ "--disable-doc-gen" - ] ++ lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--with-sandbox-shell=${busybox-sandbox-shell}/bin/busybox" - ] ++ lib.optionals (atLeast210 && stdenv.isLinux && stdenv.hostPlatform.isStatic) [ + ] ++ lib.optionals (atLeast210 && stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isStatic) [ "--enable-embedded-sandbox-shell" ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform ? nix && stdenv.hostPlatform.nix ? system) [ "--with-system=${stdenv.hostPlatform.nix.system}" @@ -234,16 +234,16 @@ self = stdenv.mkDerivation { installCheckTarget = if atLeast210 then "installcheck" else null; # socket path becomes too long otherwise - preInstallCheck = lib.optionalString stdenv.isDarwin '' + preInstallCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' export TMPDIR=$NIX_BUILD_TOP '' # Prevent crashes in libcurl due to invoking Objective-C `+initialize` methods after `fork`. # See http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html. - + lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES '' # See https://github.com/NixOS/nix/issues/5687 - + lib.optionalString (atLeast25 && stdenv.isDarwin) '' + + lib.optionalString (atLeast25 && stdenv.hostPlatform.isDarwin) '' echo "exit 99" > tests/gc-non-blocking.sh '' # TODO: investigate why this broken + lib.optionalString (atLeast25 && stdenv.hostPlatform.system == "aarch64-linux") '' @@ -253,7 +253,7 @@ self = stdenv.mkDerivation { export MANPATH=$man/share/man:$MANPATH ''; - separateDebugInfo = stdenv.isLinux && (atLeast24 -> !enableStatic); + separateDebugInfo = stdenv.hostPlatform.isLinux && (atLeast24 -> !enableStatic); enableParallelBuilding = true; @@ -283,7 +283,7 @@ self = stdenv.mkDerivation { inherit lib pkgs; nix = self; }; - } // lib.optionalAttrs stdenv.isLinux { + } // lib.optionalAttrs stdenv.hostPlatform.isLinux { nixStatic = pkgsStatic.nixVersions.${self_attribute_name}; # Basic smoke tests that needs to pass when upgrading nix. |