git.iko.soy/typeable/nixpkgs
on master help sign in
stdenv linux, stdenv cross: Harmonize extraNativeBuildInputs

Want to make sure these are the same per host platform, without duplication.

commitf2bb59e710a4805653266833fa80940e600f3ecf authorJohn Ericson <John.Ericson@Obsidian.Systems> dateTue 11 Sep 2018, 12:47 (8 years ago) parent2111e7b
2 files changed+13−7
pkgs/stdenv/cross/default.nix+6−3 pkgs/stdenv/linux/default.nix+7−4
pkgs/stdenv/cross/default.nix+6−3
@@ -53,12 +53,15 @@ in lib.init bootStages ++ [
5353 else buildPackages.gcc;
5454
5555 extraNativeBuildInputs = old.extraNativeBuildInputs
56+ ++ lib.optionals
57+ (hostPlatform.isLinux && !buildPlatform.isLinux)
58+ [ buildPackages.patchelf buildPackages.paxctl ]
59+ ++ lib.optional
60+ (let f = p: !p.isx86 || p.libc == "musl"; in f hostPlatform && !(f buildPlatform))
61+ buildPackages.updateAutotoolsGnuConfigScriptsHook
5662 # without proper `file` command, libtool sometimes fails
5763 # to recognize 64-bit DLLs
5864 ++ lib.optional (hostPlatform.config == "x86_64-w64-mingw32") buildPackages.file
59− ++ lib.optional
60− (hostPlatform.isAarch64 || hostPlatform.isMips || hostPlatform.libc == "musl")
61− buildPackages.updateAutotoolsGnuConfigScriptsHook
6265 ;
6366 });
6467 })
pkgs/stdenv/linux/default.nix+7−4
@@ -251,7 +251,8 @@ in
251251 };
252252 extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
253253 # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
254− lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
254+ lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
255+ prevStage.updateAutotoolsGnuConfigScriptsHook;
255256 })
256257
257258
@@ -292,7 +293,8 @@ in
292293 };
293294 extraNativeBuildInputs = [ prevStage.patchelf prevStage.xz ] ++
294295 # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
295− lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
296+ lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
297+ prevStage.updateAutotoolsGnuConfigScriptsHook;
296298 })
297299
298300 # Construct the final stdenv. It uses the Glibc and GCC, and adds
@@ -324,7 +326,8 @@ in
324326
325327 extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
326328 # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
327− lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
329+ lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
330+ prevStage.updateAutotoolsGnuConfigScriptsHook;
328331
329332 cc = prevStage.gcc;
330333
@@ -357,7 +360,7 @@ in
357360 ++ [ /*propagated from .dev*/ linuxHeaders
358361 binutils gcc gcc.cc gcc.cc.lib gcc.expand-response-params
359362 ]
360− ++ lib.optionals (!localSystem.isx86)
363+ ++ lib.optionals (!localSystem.isx86 || localSystem.libc == "musl")
361364 [ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ];
362365
363366 overrides = self: super: {