1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

stdenv: remove with statements

This commit is contained in:
Philip Taron 2024-08-16 14:11:32 -07:00
parent 9ef28332db
commit 2cf5e918df
No known key found for this signature in database

View file

@ -500,7 +500,7 @@ in
assert isFromBootstrapFiles prevStage.coreutils;
assert isFromBootstrapFiles prevStage.gnugrep;
assert isBuiltByNixpkgsCompiler prevStage.patchelf;
assert lib.all isBuiltByNixpkgsCompiler (with prevStage; [ gmp isl_0_20 libmpc mpfr ]);
assert lib.all isBuiltByNixpkgsCompiler [ prevStage.gmp prevStage.isl_0_20 prevStage.libmpc prevStage.mpfr ];
stageFun prevStage {
name = "bootstrap-stage3";
@ -634,19 +634,24 @@ in
disallowedRequisites = [ bootstrapTools.out ];
# Mainly avoid reference to bootstrap tools
allowedRequisites = with prevStage; with lib;
allowedRequisites = let
inherit (prevStage) gzip bzip2 xz zlib bash binutils coreutils diffutils findutils
gawk gmp gnumake gnused gnutar gnugrep gnupatch patchelf ed file glibc
attr acl libidn2 libunistring linuxHeaders gcc fortify-headers gcc-unwrapped
;
in
# Simple executable tools
concatMap (p: [ (getBin p) (getLib p) ]) [
lib.concatMap (p: [ (lib.getBin p) (lib.getLib p) ]) [
gzip bzip2 xz bash binutils.bintools coreutils diffutils findutils
gawk gmp gnumake gnused gnutar gnugrep gnupatch patchelf ed file
]
# Library dependencies
++ map getLib (
++ map lib.getLib (
[ attr acl zlib gnugrep.pcre2 libidn2 libunistring ]
++ lib.optional (gawk.libsigsegv != null) gawk.libsigsegv
)
# More complicated cases
++ (map (x: getOutput x (getLibc prevStage)) [ "out" "dev" "bin" ] )
++ (map (x: lib.getOutput x (getLibc prevStage)) [ "out" "dev" "bin" ] )
++ [ linuxHeaders # propagated from .dev
binutils gcc gcc.cc gcc.cc.lib
gcc.expand-response-params # != (prevStage.)expand-response-params
@ -654,9 +659,9 @@ in
]
++ lib.optionals (localSystem.libc == "musl") [ fortify-headers ]
++ [ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ]
++ (with gcc-unwrapped.passthru; [
gmp libmpc mpfr isl
])
++ [
gcc-unwrapped.gmp gcc-unwrapped.libmpc gcc-unwrapped.mpfr gcc-unwrapped.isl
]
;
overrides = self: super: {