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.coreutils;
assert isFromBootstrapFiles prevStage.gnugrep; assert isFromBootstrapFiles prevStage.gnugrep;
assert isBuiltByNixpkgsCompiler prevStage.patchelf; 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 { stageFun prevStage {
name = "bootstrap-stage3"; name = "bootstrap-stage3";
@ -634,19 +634,24 @@ in
disallowedRequisites = [ bootstrapTools.out ]; disallowedRequisites = [ bootstrapTools.out ];
# Mainly avoid reference to bootstrap tools # 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 # 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 gzip bzip2 xz bash binutils.bintools coreutils diffutils findutils
gawk gmp gnumake gnused gnutar gnugrep gnupatch patchelf ed file gawk gmp gnumake gnused gnutar gnugrep gnupatch patchelf ed file
] ]
# Library dependencies # Library dependencies
++ map getLib ( ++ map lib.getLib (
[ attr acl zlib gnugrep.pcre2 libidn2 libunistring ] [ attr acl zlib gnugrep.pcre2 libidn2 libunistring ]
++ lib.optional (gawk.libsigsegv != null) gawk.libsigsegv ++ lib.optional (gawk.libsigsegv != null) gawk.libsigsegv
) )
# More complicated cases # 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 ++ [ linuxHeaders # propagated from .dev
binutils gcc gcc.cc gcc.cc.lib binutils gcc gcc.cc gcc.cc.lib
gcc.expand-response-params # != (prevStage.)expand-response-params gcc.expand-response-params # != (prevStage.)expand-response-params
@ -654,9 +659,9 @@ in
] ]
++ lib.optionals (localSystem.libc == "musl") [ fortify-headers ] ++ lib.optionals (localSystem.libc == "musl") [ fortify-headers ]
++ [ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ] ++ [ 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: { overrides = self: super: {