diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-10-30 13:32:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-30 13:32:13 -0500 |
commit | 989b403c7feabeaf0dcd62c67670aa6f9f1786a2 (patch) | |
tree | 7ea70f701bec7872727a924639aa86383daa3052 | |
parent | 0126c86672b7d14843225df16ddfefd7091eabe7 (diff) | |
parent | 48309677368e3fac5489326e00f1d6b0513d2b8e (diff) |
Merge pull request #96318 from matthewbauer/provide-patchelf-in-native-stdenv
stdenv/native: provide patchelf on linux
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 2 | ||||
-rw-r--r-- | pkgs/stdenv/native/default.nix | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 0e4e76d72843..09cef8b8678d 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -57,7 +57,7 @@ let suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config; expand-response-params = - if buildPackages.stdenv.hasCC && buildPackages.stdenv.cc != "/dev/null" + if (buildPackages.stdenv.hasCC or false) && buildPackages.stdenv.cc != "/dev/null" then import ../expand-response-params { inherit (buildPackages) stdenv; } else ""; diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix index f6e0df161ad0..b79b81253ad5 100644 --- a/pkgs/stdenv/native/default.nix +++ b/pkgs/stdenv/native/default.nix @@ -78,7 +78,7 @@ let # A function that builds a "native" stdenv (one that uses tools in # /usr etc.). makeStdenv = - { cc, fetchurl, extraPath ? [], overrides ? (self: super: { }) }: + { cc, fetchurl, extraPath ? [], overrides ? (self: super: { }), extraNativeBuildInputs ? [] }: import ../generic { buildPlatform = localSystem; @@ -94,10 +94,10 @@ let if system == "x86_64-cygwin" then prehookCygwin else prehookBase; - extraNativeBuildInputs = - if system == "i686-cygwin" then extraNativeBuildInputsCygwin else + extraNativeBuildInputs = extraNativeBuildInputs ++ + (if system == "i686-cygwin" then extraNativeBuildInputsCygwin else if system == "x86_64-cygwin" then extraNativeBuildInputsCygwin else - []; + []); initialPath = extraPath ++ path; @@ -163,6 +163,7 @@ in inherit (prevStage.stdenv) cc fetchurl; extraPath = [ prevStage.xz ]; overrides = self: super: { inherit (prevStage) xz; }; + extraNativeBuildInputs = if localSystem.isLinux then [ prevStage.patchelf ] else []; }; }) |