darwin stdenv: Float persistentN
bindings into per-stage let
s
This commit is contained in:
parent
19a5e00985
commit
61d241f405
@ -165,32 +165,32 @@ in rec {
|
|||||||
extraBuildInputs = [];
|
extraBuildInputs = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
persistent0 = _: _: _: {};
|
stage1 = prevStage: let
|
||||||
|
persistent = _: _: {};
|
||||||
stage1 = prevStage: with prevStage; stageFun 1 prevStage {
|
in with prevStage; stageFun 1 prevStage {
|
||||||
extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\"";
|
extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\"";
|
||||||
extraBuildInputs = [ pkgs.libcxx ];
|
extraBuildInputs = [ pkgs.libcxx ];
|
||||||
|
|
||||||
allowedRequisites =
|
allowedRequisites =
|
||||||
[ bootstrapTools ] ++ (with pkgs; [ libcxx libcxxabi ]) ++ [ pkgs.darwin.Libsystem ];
|
[ bootstrapTools ] ++ (with pkgs; [ libcxx libcxxabi ]) ++ [ pkgs.darwin.Libsystem ];
|
||||||
|
|
||||||
overrides = persistent0 prevStage;
|
overrides = persistent;
|
||||||
};
|
};
|
||||||
|
|
||||||
persistent1 = prevStage: self: super: with prevStage; {
|
stage2 = prevStage: let
|
||||||
inherit
|
persistent = self: super: with prevStage; {
|
||||||
zlib patchutils m4 scons flex perl bison unifdef unzip openssl python
|
inherit
|
||||||
libxml2 gettext sharutils gmp libarchive ncurses pkg-config libedit groff
|
zlib patchutils m4 scons flex perl bison unifdef unzip openssl python
|
||||||
openssh sqlite sed serf openldap db cyrus-sasl expat apr-util subversion xz
|
libxml2 gettext sharutils gmp libarchive ncurses pkg-config libedit groff
|
||||||
findfreetype libssh curl cmake autoconf automake libtool ed cpio coreutils;
|
openssh sqlite sed serf openldap db cyrus-sasl expat apr-util subversion xz
|
||||||
|
findfreetype libssh curl cmake autoconf automake libtool ed cpio coreutils;
|
||||||
|
|
||||||
darwin = super.darwin // {
|
darwin = super.darwin // {
|
||||||
inherit (darwin)
|
inherit (darwin)
|
||||||
dyld Libsystem xnu configd ICU libdispatch libclosure launchd;
|
dyld Libsystem xnu configd ICU libdispatch libclosure launchd;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
in with prevStage; stageFun 2 prevStage {
|
||||||
|
|
||||||
stage2 = prevStage: with prevStage; stageFun 2 prevStage {
|
|
||||||
extraPreHook = ''
|
extraPreHook = ''
|
||||||
export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
|
export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
|
||||||
'';
|
'';
|
||||||
@ -202,24 +202,24 @@ in rec {
|
|||||||
(with pkgs; [ xz.bin xz.out libcxx libcxxabi ]) ++
|
(with pkgs; [ xz.bin xz.out libcxx libcxxabi ]) ++
|
||||||
(with pkgs.darwin; [ dyld Libsystem CF ICU locale ]);
|
(with pkgs.darwin; [ dyld Libsystem CF ICU locale ]);
|
||||||
|
|
||||||
overrides = persistent1 prevStage;
|
overrides = persistent;
|
||||||
};
|
};
|
||||||
|
|
||||||
persistent2 = prevStage: self: super: with prevStage; {
|
stage3 = prevStage: let
|
||||||
inherit
|
persistent = self: super: with prevStage; {
|
||||||
patchutils m4 scons flex perl bison unifdef unzip openssl python
|
inherit
|
||||||
gettext sharutils libarchive pkg-config groff bash subversion
|
patchutils m4 scons flex perl bison unifdef unzip openssl python
|
||||||
openssh sqlite sed serf openldap db cyrus-sasl expat apr-util
|
gettext sharutils libarchive pkg-config groff bash subversion
|
||||||
findfreetype libssh curl cmake autoconf automake libtool cpio
|
openssh sqlite sed serf openldap db cyrus-sasl expat apr-util
|
||||||
libcxx libcxxabi;
|
findfreetype libssh curl cmake autoconf automake libtool cpio
|
||||||
|
libcxx libcxxabi;
|
||||||
|
|
||||||
darwin = super.darwin // {
|
darwin = super.darwin // {
|
||||||
inherit (darwin)
|
inherit (darwin)
|
||||||
dyld Libsystem xnu configd libdispatch libclosure launchd libiconv locale;
|
dyld Libsystem xnu configd libdispatch libclosure launchd libiconv locale;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
in with prevStage; stageFun 3 prevStage {
|
||||||
|
|
||||||
stage3 = prevStage: with prevStage; stageFun 3 prevStage {
|
|
||||||
shell = "${pkgs.bash}/bin/bash";
|
shell = "${pkgs.bash}/bin/bash";
|
||||||
|
|
||||||
# We have a valid shell here (this one has no bootstrap-tools runtime deps) so stageFun
|
# We have a valid shell here (this one has no bootstrap-tools runtime deps) so stageFun
|
||||||
@ -238,54 +238,55 @@ in rec {
|
|||||||
(with pkgs; [ xz.bin xz.out bash libcxx libcxxabi ]) ++
|
(with pkgs; [ xz.bin xz.out bash libcxx libcxxabi ]) ++
|
||||||
(with pkgs.darwin; [ dyld ICU Libsystem locale ]);
|
(with pkgs.darwin; [ dyld ICU Libsystem locale ]);
|
||||||
|
|
||||||
overrides = persistent2 prevStage;
|
overrides = persistent;
|
||||||
};
|
};
|
||||||
|
|
||||||
persistent3 = prevStage: self: super: with prevStage; {
|
stage4 = prevStage: let
|
||||||
inherit
|
persistent = self: super: with prevStage; {
|
||||||
gnumake gzip gnused bzip2 gawk ed xz patch bash
|
inherit
|
||||||
libcxxabi libcxx ncurses libffi zlib gmp pcre gnugrep
|
gnumake gzip gnused bzip2 gawk ed xz patch bash
|
||||||
coreutils findutils diffutils patchutils;
|
libcxxabi libcxx ncurses libffi zlib gmp pcre gnugrep
|
||||||
|
coreutils findutils diffutils patchutils;
|
||||||
|
|
||||||
llvmPackages = let llvmOverride = llvmPackages.llvm.override { inherit libcxxabi; };
|
llvmPackages = let llvmOverride = llvmPackages.llvm.override { inherit libcxxabi; };
|
||||||
in super.llvmPackages // {
|
in super.llvmPackages // {
|
||||||
llvm = llvmOverride;
|
llvm = llvmOverride;
|
||||||
clang-unwrapped = llvmPackages.clang-unwrapped.override { llvm = llvmOverride; };
|
clang-unwrapped = llvmPackages.clang-unwrapped.override { llvm = llvmOverride; };
|
||||||
};
|
};
|
||||||
|
|
||||||
darwin = super.darwin // {
|
darwin = super.darwin // {
|
||||||
inherit (darwin) dyld Libsystem libiconv locale;
|
inherit (darwin) dyld Libsystem libiconv locale;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
in with prevStage; stageFun 4 prevStage {
|
||||||
|
|
||||||
stage4 = prevStage: with prevStage; stageFun 4 prevStage {
|
|
||||||
shell = "${pkgs.bash}/bin/bash";
|
shell = "${pkgs.bash}/bin/bash";
|
||||||
extraBuildInputs = with pkgs; [ xz darwin.CF libcxx pkgs.bash ];
|
extraBuildInputs = with pkgs; [ xz darwin.CF libcxx pkgs.bash ];
|
||||||
extraPreHook = ''
|
extraPreHook = ''
|
||||||
export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
|
export PATH_LOCALE=${pkgs.darwin.locale}/share/locale
|
||||||
'';
|
'';
|
||||||
overrides = persistent3 prevStage;
|
overrides = persistent;
|
||||||
};
|
};
|
||||||
|
|
||||||
persistent4 = prevStage: self: super: with prevStage; {
|
stdenvDarwin = prevStage: let
|
||||||
inherit
|
pkgs = prevStage;
|
||||||
gnumake gzip gnused bzip2 gawk ed xz patch bash
|
persistent = self: super: with prevStage; {
|
||||||
libcxxabi libcxx ncurses libffi zlib llvm gmp pcre gnugrep
|
inherit
|
||||||
coreutils findutils diffutils patchutils;
|
gnumake gzip gnused bzip2 gawk ed xz patch bash
|
||||||
|
libcxxabi libcxx ncurses libffi zlib llvm gmp pcre gnugrep
|
||||||
|
coreutils findutils diffutils patchutils;
|
||||||
|
|
||||||
llvmPackages = super.llvmPackages // {
|
llvmPackages = super.llvmPackages // {
|
||||||
inherit (llvmPackages) llvm clang-unwrapped;
|
inherit (llvmPackages) llvm clang-unwrapped;
|
||||||
|
};
|
||||||
|
|
||||||
|
darwin = super.darwin // {
|
||||||
|
inherit (darwin) dyld ICU Libsystem cctools libiconv;
|
||||||
|
};
|
||||||
|
} // lib.optionalAttrs (super.targetPlatform == localSystem) {
|
||||||
|
# Need to get rid of these when cross-compiling.
|
||||||
|
inherit binutils binutils-raw;
|
||||||
};
|
};
|
||||||
|
in import ../generic rec {
|
||||||
darwin = super.darwin // {
|
|
||||||
inherit (darwin) dyld ICU Libsystem cctools libiconv;
|
|
||||||
};
|
|
||||||
} // lib.optionalAttrs (super.targetPlatform == localSystem) {
|
|
||||||
# Need to get rid of these when cross-compiling.
|
|
||||||
inherit binutils binutils-raw;
|
|
||||||
};
|
|
||||||
|
|
||||||
stdenvDarwin = prevStage: let pkgs = prevStage; in import ../generic rec {
|
|
||||||
inherit config;
|
inherit config;
|
||||||
inherit (pkgs.stdenv) fetchurlBoot;
|
inherit (pkgs.stdenv) fetchurlBoot;
|
||||||
|
|
||||||
@ -344,9 +345,9 @@ in rec {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
overrides = self: super:
|
overrides = self: super:
|
||||||
let persistent = persistent4 prevStage self super; in persistent // {
|
let persistent' = persistent self super; in persistent' // {
|
||||||
clang = cc;
|
clang = cc;
|
||||||
llvmPackages = persistent.llvmPackages // { clang = cc; };
|
llvmPackages = persistent'.llvmPackages // { clang = cc; };
|
||||||
inherit cc;
|
inherit cc;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user