diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-08-25 17:54:27 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-08-25 17:54:27 -0500 |
commit | 54210573c1e2db45d5abbda4c3ce1afc25210889 (patch) | |
tree | c8fda2df7c22d9cbbaa138aef71ad305d5027dbc /pkgs/stdenv | |
parent | d436e930272b560ce7f0eaaf6decc142e8c804a4 (diff) | |
download | nixlib-54210573c1e2db45d5abbda4c3ce1afc25210889.tar nixlib-54210573c1e2db45d5abbda4c3ce1afc25210889.tar.gz nixlib-54210573c1e2db45d5abbda4c3ce1afc25210889.tar.bz2 nixlib-54210573c1e2db45d5abbda4c3ce1afc25210889.tar.lz nixlib-54210573c1e2db45d5abbda4c3ce1afc25210889.tar.xz nixlib-54210573c1e2db45d5abbda4c3ce1afc25210889.tar.zst nixlib-54210573c1e2db45d5abbda4c3ce1afc25210889.zip |
stdenv/native: provide patchelf on linux
This provides consistency with the pure stdenv, which provides patchelf this way. Native stdenv can always just manually install patchelf on their system, but like xz, it’s unlikely to be provided in /usr/bin/. In addition, it’s not even in the RHEL7 repos.
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/native/default.nix | 9 |
1 files changed, 5 insertions, 4 deletions
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 []; }; }) |