forked from mirrors/nixpkgs
stdenv linux, stdenv cross: Harmonize extraNativeBuildInputs
Want to make sure these are the same per host platform, without duplication.
This commit is contained in:
parent
2111e7b742
commit
f2bb59e710
|
@ -53,12 +53,15 @@ in lib.init bootStages ++ [
|
|||
else buildPackages.gcc;
|
||||
|
||||
extraNativeBuildInputs = old.extraNativeBuildInputs
|
||||
++ lib.optionals
|
||||
(hostPlatform.isLinux && !buildPlatform.isLinux)
|
||||
[ buildPackages.patchelf buildPackages.paxctl ]
|
||||
++ lib.optional
|
||||
(let f = p: !p.isx86 || p.libc == "musl"; in f hostPlatform && !(f buildPlatform))
|
||||
buildPackages.updateAutotoolsGnuConfigScriptsHook
|
||||
# without proper `file` command, libtool sometimes fails
|
||||
# to recognize 64-bit DLLs
|
||||
++ lib.optional (hostPlatform.config == "x86_64-w64-mingw32") buildPackages.file
|
||||
++ lib.optional
|
||||
(hostPlatform.isAarch64 || hostPlatform.isMips || hostPlatform.libc == "musl")
|
||||
buildPackages.updateAutotoolsGnuConfigScriptsHook
|
||||
;
|
||||
});
|
||||
})
|
||||
|
|
|
@ -251,7 +251,8 @@ in
|
|||
};
|
||||
extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
|
||||
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
|
||||
lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
|
||||
prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
})
|
||||
|
||||
|
||||
|
@ -292,7 +293,8 @@ in
|
|||
};
|
||||
extraNativeBuildInputs = [ prevStage.patchelf prevStage.xz ] ++
|
||||
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
|
||||
lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
|
||||
prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
})
|
||||
|
||||
# Construct the final stdenv. It uses the Glibc and GCC, and adds
|
||||
|
@ -324,7 +326,8 @@ in
|
|||
|
||||
extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
|
||||
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
|
||||
lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
|
||||
prevStage.updateAutotoolsGnuConfigScriptsHook;
|
||||
|
||||
cc = prevStage.gcc;
|
||||
|
||||
|
@ -357,7 +360,7 @@ in
|
|||
++ [ /*propagated from .dev*/ linuxHeaders
|
||||
binutils gcc gcc.cc gcc.cc.lib gcc.expand-response-params
|
||||
]
|
||||
++ lib.optionals (!localSystem.isx86)
|
||||
++ lib.optionals (!localSystem.isx86 || localSystem.libc == "musl")
|
||||
[ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ];
|
||||
|
||||
overrides = self: super: {
|
||||
|
|
Loading…
Reference in a new issue