Move stdenv bootstrap binaries out of the tree

Commit 986f36194650e2a41451cbfb9f29ce1c66a62df3 started to use
<nix/fetchurl.nix> to "download" the bootstrap binaries from the
Nixpkgs tree, using the file:/// scheme. This has really bad
consequences:

* It makes any derivation depend on the path of the Nixpkgs tree. So
evaluating a package will produce a different .drv file when run
from different locations. No wonder Hydra evaluation has been so
slow lately: for every Nixpkgs evaluation, it had to create tens of
thousands of .drv files, even if nothing had changed.

* It requires the builder to have file system access to the Nixpkgs
tree. So if your tree is in your home directory, the stdenv
bootstrap would probably fail.

So now the binaries are downloaded from tarballs.nixos.org.

Also dropped PowerPC "support".

+17 -175
pkgs/stdenv/linux/bootstrap/armv5tel/bzip2

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/armv5tel/cpio

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/armv5tel/curl.bz2

This is a binary file and will not be displayed.

+6 -30
pkgs/stdenv/linux/bootstrap/armv5tel/default.nix
··· 1 - let fetch = { file, sha256 }: 2 - let 3 - nixFetchurl = import <nix/fetchurl.nix>; 4 - args = { 5 - url = "file://${builtins.toString ./.}/${file}"; 6 - inherit sha256; 7 - executable = true; 8 - }; 9 - in if (builtins.functionArgs nixFetchurl) ? executable 10 - then nixFetchurl args 11 - else derivation { 12 - name = file; 13 - builder = "/bin/sh"; 14 - 15 - system = builtins.currentSystem; 16 - 17 - args = [ "-c" "echo $message; exit 1" ]; 18 - 19 - message = '' 20 - Sorry, this version of nix cannot download all of the bootstrap tools. 21 - Please download ${args.url}, make it executable, add it to the store 22 - with `nix-store --add', and try again. 23 - ''; 24 - 25 - outputHashAlgo = "sha256"; 26 - 27 - outputHash = args.sha256; 28 29 - outputHashMode = "recursive"; 30 31 - preferLocalBuild = true; 32 - }; 33 in { 34 sh = fetch { 35 file = "sh";
··· 1 + let 2 3 + fetch = { file, sha256 }: import <nix/fetchurl.nix> { 4 + url = "http://tarballs.nixos.org/stdenv-linux/armv5tel/r18744/${file}"; 5 + inherit sha256; 6 + executable = true; 7 + }; 8 9 in { 10 sh = fetch { 11 file = "sh";
pkgs/stdenv/linux/bootstrap/armv5tel/ln

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/armv5tel/mkdir

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/armv5tel/sh

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/i686/bzip2

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/i686/cpio

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/i686/curl.bz2

This is a binary file and will not be displayed.

+5 -35
pkgs/stdenv/linux/bootstrap/i686/default.nix
··· 1 let 2 - fetch = { file, sha256 }: 3 - let 4 - nixFetchurl = import <nix/fetchurl.nix>; 5 - args = { 6 - url = "file://${builtins.toString ./.}/${file}"; 7 - inherit sha256; 8 - executable = true; 9 - }; 10 - in if (builtins.functionArgs nixFetchurl) ? executable 11 - then nixFetchurl args 12 - else derivation { 13 - name = file; 14 - builder = "/bin/sh"; 15 16 - system = builtins.currentSystem; 17 - 18 - args = [ "-c" "echo $message; exit 1" ]; 19 - 20 - message = '' 21 - Sorry, this version of nix cannot download all of the bootstrap tools. 22 - Please download ${args.url}, make it executable, add it to the store 23 - with `nix-store --add', and try again. 24 - ''; 25 26 - outputHashAlgo = "sha256"; 27 - 28 - outputHash = args.sha256; 29 - 30 - outputHashMode = "recursive"; 31 - 32 - preferLocalBuild = true; 33 - }; 34 in { 35 sh = fetch { 36 file = "sh"; ··· 50 cpio = fetch { 51 file = "cpio"; 52 sha256 = "046if3aqqramyhrn2yxrjf4bfkl8x1bcqxhvi7ml9nrv9smx8irg"; 53 - }; 54 - 55 - ln = fetch { 56 - file = "ln"; 57 - sha256 = "06vr474i3x55p0rnqa87yx7dzf4qdfpfg201mks39id43cjm9f8j"; 58 }; 59 60 curl = fetch {
··· 1 let 2 3 + fetch = { file, sha256 }: import <nix/fetchurl.nix> { 4 + url = "http://tarballs.nixos.org/stdenv-linux/i686/r24519/${file}"; 5 + inherit sha256; 6 + executable = true; 7 + }; 8 9 in { 10 sh = fetch { 11 file = "sh"; ··· 25 cpio = fetch { 26 file = "cpio"; 27 sha256 = "046if3aqqramyhrn2yxrjf4bfkl8x1bcqxhvi7ml9nrv9smx8irg"; 28 }; 29 30 curl = fetch {
pkgs/stdenv/linux/bootstrap/i686/ln

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/i686/mkdir

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/i686/sh

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/loongson2f/bzip2

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/loongson2f/cpio

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/loongson2f/curl.bz2

This is a binary file and will not be displayed.

+5 -30
pkgs/stdenv/linux/bootstrap/loongson2f/default.nix
··· 1 let 2 - fetch = { file, sha256 }: 3 - let 4 - nixFetchurl = import <nix/fetchurl.nix>; 5 - args = { 6 - url = "file://${builtins.toString ./.}/${file}"; 7 - inherit sha256; 8 - executable = true; 9 - }; 10 - in if (builtins.functionArgs nixFetchurl) ? executable 11 - then nixFetchurl args 12 - else derivation { 13 - name = file; 14 - builder = "/bin/sh"; 15 16 - system = builtins.currentSystem; 17 18 - args = [ "-c" "echo $message; exit 1" ]; 19 - 20 - message = '' 21 - Sorry, this version of nix cannot download all of the bootstrap tools. 22 - Please download ${args.url}, make it executable, add it to the store 23 - with `nix-store --add', and try again. 24 - ''; 25 - 26 - outputHashAlgo = "sha256"; 27 - 28 - outputHash = args.sha256; 29 - 30 - outputHashMode = "recursive"; 31 - 32 - preferLocalBuild = true; 33 - }; 34 in { 35 sh = fetch { 36 file = "sh";
··· 1 let 2 3 + fetch = { file, sha256 }: import <nix/fetchurl.nix> { 4 + url = "http://tarballs.nixos.org/stdenv-linux/loongson2f/r22849/${file}"; 5 + inherit sha256; 6 + executable = true; 7 + }; 8 9 in { 10 sh = fetch { 11 file = "sh";
pkgs/stdenv/linux/bootstrap/loongson2f/ln

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/loongson2f/mkdir

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/loongson2f/sh

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/powerpc/bash

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/powerpc/bzip2

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/powerpc/cp

This is a binary file and will not be displayed.

pkgs/stdenv/linux/bootstrap/powerpc/curl.bz2

This is a binary file and will not be displayed.

-79
pkgs/stdenv/linux/bootstrap/powerpc/default.nix
··· 1 - let 2 - fetch = { file, sha256 }: 3 - let 4 - nixFetchurl = import <nix/fetchurl.nix>; 5 - args = { 6 - url = "file://${builtins.toString ./.}/${file}"; 7 - inherit sha256; 8 - executable = true; 9 - }; 10 - in if (builtins.functionArgs nixFetchurl) ? executable 11 - then nixFetchurl args 12 - else derivation { 13 - name = file; 14 - builder = "/bin/sh"; 15 - 16 - system = builtins.currentSystem; 17 - 18 - args = [ "-c" "echo $message; exit 1" ]; 19 - 20 - message = '' 21 - Sorry, this version of nix cannot download all of the bootstrap tools. 22 - Please download ${args.url}, make it executable, add it to the store 23 - with `nix-store --add', and try again. 24 - ''; 25 - 26 - outputHashAlgo = "sha256"; 27 - 28 - outputHash = args.sha256; 29 - 30 - outputHashMode = "recursive"; 31 - 32 - preferLocalBuild = true; 33 - }; 34 - in { 35 - bash = fetch { 36 - file = "bash"; 37 - sha256 = "0zss8im6hbx6z2i2wxn1554kd7ggdqdli4xk39cy5fchlnz9bqpp"; 38 - }; 39 - 40 - bzip2 = fetch { 41 - file = "bzip2"; 42 - sha256 = "01ylj8x7albv6k9sqx2h1prsazh4d8y22nga0pwai2bnns0q9qdg"; 43 - }; 44 - 45 - cp = fetch { 46 - file = "cp"; 47 - sha256 = "0d7xbzrv22bxgw7w9b03rakirna5zfvr9gzwm7ichd2fh634hvgl"; 48 - }; 49 - 50 - curl = fetch { 51 - file = "curl.bz2"; 52 - sha256 = "17c25dfslw3qkjlcmihpbhn3x4kj9pgkslizv89ggnki7iiy4jgh"; 53 - }; 54 - 55 - tar = fetch { 56 - file = "tar.bz2"; 57 - sha256 = "132ylqwz02hw5njqx7wvj4sxpcrllx8b8b3a00rlv6iad671ayyr"; 58 - }; 59 - 60 - staticToolsURL = { 61 - url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/static-tools.tar.bz2; 62 - sha1 = "e4d1680e3dfa752e49a996a31140db53b10061cb"; 63 - }; 64 - 65 - binutilsURL = { 66 - url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/binutils.tar.bz2; 67 - sha1 = "2609f4d9277a60fcd178395d3d49911190e08f36"; 68 - }; 69 - 70 - gccURL = { 71 - url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/gcc.tar.bz2; 72 - sha1 = "71d79d736bfef6252208fe6239e528a591becbed"; 73 - }; 74 - 75 - glibcURL = { 76 - url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/glibc.tar.bz2; 77 - sha1 = "bf0245e16235800c8aa9c6a5de6565583a66e46d"; 78 - }; 79 - }
···
pkgs/stdenv/linux/bootstrap/powerpc/tar.bz2

This is a binary file and will not be displayed.

+1 -1
pkgs/stdenv/linux/default.nix
··· 16 bootstrapFiles = 17 if system == "i686-linux" then import ./bootstrap/i686 18 else if system == "x86_64-linux" then import ./bootstrap/x86_64 19 - else if system == "powerpc-linux" then import ./bootstrap/powerpc 20 else if system == "armv5tel-linux" then import ./bootstrap/armv5tel 21 else if system == "armv6l-linux" then import ./bootstrap/armv6l 22 else if system == "armv7l-linux" then import ./bootstrap/armv6l ··· 52 then [ ./scripts/unpack-bootstrap-tools-arm.sh ] 53 else [ ./scripts/unpack-bootstrap-tools.sh ]; 54 55 inherit (bootstrapFiles) bzip2 mkdir curl cpio; 56 57 tarball = import <nix/fetchurl.nix> {
··· 16 bootstrapFiles = 17 if system == "i686-linux" then import ./bootstrap/i686 18 else if system == "x86_64-linux" then import ./bootstrap/x86_64 19 else if system == "armv5tel-linux" then import ./bootstrap/armv5tel 20 else if system == "armv6l-linux" then import ./bootstrap/armv6l 21 else if system == "armv7l-linux" then import ./bootstrap/armv6l ··· 51 then [ ./scripts/unpack-bootstrap-tools-arm.sh ] 52 else [ ./scripts/unpack-bootstrap-tools.sh ]; 53 54 + # FIXME: get rid of curl. 55 inherit (bootstrapFiles) bzip2 mkdir curl cpio; 56 57 tarball = import <nix/fetchurl.nix> {