diff options
author | John Ericson <Ericson2314@yahoo.com> | 2016-12-15 17:59:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-15 17:59:24 -0500 |
commit | 63bf5f3ba37b3eb39f61eb3e177844c1a811e3e6 (patch) | |
tree | 371280f906620086f0f2c0b1155c2556cadb8278 | |
parent | 4af2328e5cbf0835caf95e9a753f42c1d1d4592b (diff) | |
parent | 19fbe80c3d1f3b5888a3f78f2df2af07355ea498 (diff) | |
download | nixpkgs-63bf5f3ba37b3eb39f61eb3e177844c1a811e3e6.tar nixpkgs-63bf5f3ba37b3eb39f61eb3e177844c1a811e3e6.tar.gz nixpkgs-63bf5f3ba37b3eb39f61eb3e177844c1a811e3e6.tar.bz2 nixpkgs-63bf5f3ba37b3eb39f61eb3e177844c1a811e3e6.tar.lz nixpkgs-63bf5f3ba37b3eb39f61eb3e177844c1a811e3e6.tar.xz nixpkgs-63bf5f3ba37b3eb39f61eb3e177844c1a811e3e6.tar.zst nixpkgs-63bf5f3ba37b3eb39f61eb3e177844c1a811e3e6.zip |
Merge pull request #21189 from Ericson2314/mea-culpa
Mea culpa. Tests should pass now
-rw-r--r-- | pkgs/stdenv/darwin/make-bootstrap-tools.nix | 2 | ||||
-rw-r--r-- | pkgs/stdenv/linux/bootstrap-files/armv5tel.nix (renamed from pkgs/stdenv/linux/bootstrap/armv5tel.nix) | 0 | ||||
-rw-r--r-- | pkgs/stdenv/linux/bootstrap-files/armv6l.nix (renamed from pkgs/stdenv/linux/bootstrap/armv6l.nix) | 0 | ||||
-rw-r--r-- | pkgs/stdenv/linux/bootstrap-files/armv7l.nix (renamed from pkgs/stdenv/linux/bootstrap/armv7l.nix) | 0 | ||||
-rw-r--r-- | pkgs/stdenv/linux/bootstrap-files/i686.nix (renamed from pkgs/stdenv/linux/bootstrap/i686.nix) | 0 | ||||
-rw-r--r-- | pkgs/stdenv/linux/bootstrap-files/loongson2f.nix (renamed from pkgs/stdenv/linux/bootstrap/loongson2f.nix) | 0 | ||||
-rw-r--r-- | pkgs/stdenv/linux/bootstrap-files/x86_64.nix (renamed from pkgs/stdenv/linux/bootstrap/x86_64.nix) | 0 | ||||
-rw-r--r-- | pkgs/stdenv/linux/bootstrap-tools/default.nix | 18 | ||||
-rw-r--r-- | pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh (renamed from pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh) | 0 | ||||
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 29 | ||||
-rw-r--r-- | pkgs/stdenv/linux/make-bootstrap-tools.nix | 11 | ||||
-rw-r--r-- | pkgs/top-level/default.nix | 4 |
12 files changed, 29 insertions, 35 deletions
diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index bd581f71a43..c862eb141a8 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -334,7 +334,7 @@ in rec { # The ultimate test: bootstrap a whole stdenv from the tools specified above and get a package set out of it test-pkgs = import test-pkgspath { inherit system; - stdenv = args: let + stdenvFunc = args: let args' = args // { inherit bootstrapFiles; }; in (import (test-pkgspath + "/pkgs/stdenv/darwin") args').stdenvDarwin; }; diff --git a/pkgs/stdenv/linux/bootstrap/armv5tel.nix b/pkgs/stdenv/linux/bootstrap-files/armv5tel.nix index 9781414895b..9781414895b 100644 --- a/pkgs/stdenv/linux/bootstrap/armv5tel.nix +++ b/pkgs/stdenv/linux/bootstrap-files/armv5tel.nix diff --git a/pkgs/stdenv/linux/bootstrap/armv6l.nix b/pkgs/stdenv/linux/bootstrap-files/armv6l.nix index 76fe900b9ae..76fe900b9ae 100644 --- a/pkgs/stdenv/linux/bootstrap/armv6l.nix +++ b/pkgs/stdenv/linux/bootstrap-files/armv6l.nix diff --git a/pkgs/stdenv/linux/bootstrap/armv7l.nix b/pkgs/stdenv/linux/bootstrap-files/armv7l.nix index 91452d639c4..91452d639c4 100644 --- a/pkgs/stdenv/linux/bootstrap/armv7l.nix +++ b/pkgs/stdenv/linux/bootstrap-files/armv7l.nix diff --git a/pkgs/stdenv/linux/bootstrap/i686.nix b/pkgs/stdenv/linux/bootstrap-files/i686.nix index cf484fd9253..cf484fd9253 100644 --- a/pkgs/stdenv/linux/bootstrap/i686.nix +++ b/pkgs/stdenv/linux/bootstrap-files/i686.nix diff --git a/pkgs/stdenv/linux/bootstrap/loongson2f.nix b/pkgs/stdenv/linux/bootstrap-files/loongson2f.nix index 8e22a274974..8e22a274974 100644 --- a/pkgs/stdenv/linux/bootstrap/loongson2f.nix +++ b/pkgs/stdenv/linux/bootstrap-files/loongson2f.nix diff --git a/pkgs/stdenv/linux/bootstrap/x86_64.nix b/pkgs/stdenv/linux/bootstrap-files/x86_64.nix index 69d08c5e981..69d08c5e981 100644 --- a/pkgs/stdenv/linux/bootstrap/x86_64.nix +++ b/pkgs/stdenv/linux/bootstrap-files/x86_64.nix diff --git a/pkgs/stdenv/linux/bootstrap-tools/default.nix b/pkgs/stdenv/linux/bootstrap-tools/default.nix new file mode 100644 index 00000000000..6118585d545 --- /dev/null +++ b/pkgs/stdenv/linux/bootstrap-tools/default.nix @@ -0,0 +1,18 @@ +{ system, bootstrapFiles }: + +derivation { + name = "bootstrap-tools"; + + builder = bootstrapFiles.busybox; + + args = [ "ash" "-e" ./scripts/unpack-bootstrap-tools.sh ]; + + tarball = bootstrapFiles.bootstrapTools; + + inherit system; + + # Needed by the GCC wrapper. + langC = true; + langCC = true; + isGNU = true; +} diff --git a/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh b/pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh index 85e74aea89e..85e74aea89e 100644 --- a/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh +++ b/pkgs/stdenv/linux/bootstrap-tools/scripts/unpack-bootstrap-tools.sh diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 34196359f52..9900fc6dd3d 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -7,12 +7,12 @@ , system, platform, crossSystem, config , bootstrapFiles ? - if system == "i686-linux" then import ./bootstrap/i686.nix - else if system == "x86_64-linux" then import ./bootstrap/x86_64.nix - else if system == "armv5tel-linux" then import ./bootstrap/armv5tel.nix - else if system == "armv6l-linux" then import ./bootstrap/armv6l.nix - else if system == "armv7l-linux" then import ./bootstrap/armv7l.nix - else if system == "mips64el-linux" then import ./bootstrap/loongson2f.nix + if system == "i686-linux" then import ./bootstrap-files/i686.nix + else if system == "x86_64-linux" then import ./bootstrap-files/x86_64.nix + else if system == "armv5tel-linux" then import ./bootstrap-files/armv5tel.nix + else if system == "armv6l-linux" then import ./bootstrap-files/armv6l.nix + else if system == "armv7l-linux" then import ./bootstrap-files/armv7l.nix + else if system == "mips64el-linux" then import ./bootstrap-files/loongson2f.nix else abort "unsupported platform for the pure Linux stdenv" }: @@ -37,22 +37,7 @@ rec { # Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...). - bootstrapTools = derivation { - name = "bootstrap-tools"; - - builder = bootstrapFiles.busybox; - - args = [ "ash" "-e" ./scripts/unpack-bootstrap-tools.sh ]; - - tarball = bootstrapFiles.bootstrapTools; - - inherit system; - - # Needed by the GCC wrapper. - langC = true; - langCC = true; - isGNU = true; - }; + bootstrapTools = import ./bootstrap-tools { inherit system bootstrapFiles; }; # This function builds the various standard environments used during diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 7063d7bfcb6..e13fb88eff0 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -173,16 +173,7 @@ rec { bootstrapTools = "${build}/on-server/bootstrap-tools.tar.xz"; }; - bootstrapTools = (import ./default.nix { - inherit system bootstrapFiles; - - lib = assert false; null; - allPackages = assert false; null; - - platform = assert false; null; - crossSystem = assert false; null; - config = assert false; null; - }).bootstrapTools; + bootstrapTools = import ./bootstrap-tools { inherit system bootstrapFiles; }; test = derivation { name = "test-bootstrap-tools"; diff --git a/pkgs/top-level/default.nix b/pkgs/top-level/default.nix index 31c51215676..658f149908c 100644 --- a/pkgs/top-level/default.nix +++ b/pkgs/top-level/default.nix @@ -25,7 +25,7 @@ , # The standard environment for building packages, or rather a function # providing it. See below for the arguments given to that function. - stdenv ? assert false; null + stdenvFunc ? import ../stdenv , crossSystem ? null , platform ? assert false; null @@ -76,7 +76,7 @@ in let inherit lib nixpkgsFun; } // newArgs); - stdenv = (args.stdenv or (import ../stdenv)) { + stdenv = stdenvFunc { inherit lib allPackages system platform crossSystem config; }; |