diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-20 01:16:12 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-20 01:16:12 +0200 |
commit | d4f44d6db351bdfcd089a26fc9cc973254a48cae (patch) | |
tree | 8eaaae0d3e367c66d4d23321ee6bc1c7767451e8 /pkgs/stdenv | |
parent | c49404547bc3315953baa563347beb9034bc7512 (diff) |
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".
Diffstat (limited to 'pkgs/stdenv')
28 files changed, 17 insertions, 175 deletions
diff --git a/pkgs/stdenv/linux/bootstrap/armv5tel/bzip2 b/pkgs/stdenv/linux/bootstrap/armv5tel/bzip2 deleted file mode 100755 index 5c9be292fe8b8..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/armv5tel/bzip2 +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/armv5tel/cpio b/pkgs/stdenv/linux/bootstrap/armv5tel/cpio deleted file mode 100755 index 3d69f9e5bd86c..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/armv5tel/cpio +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/armv5tel/curl.bz2 b/pkgs/stdenv/linux/bootstrap/armv5tel/curl.bz2 deleted file mode 100755 index 1f2985bd347b0..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/armv5tel/curl.bz2 +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/armv5tel/default.nix b/pkgs/stdenv/linux/bootstrap/armv5tel/default.nix index e8f04497bd915..6d18b3bd8cb15 100644 --- a/pkgs/stdenv/linux/bootstrap/armv5tel/default.nix +++ b/pkgs/stdenv/linux/bootstrap/armv5tel/default.nix @@ -1,35 +1,11 @@ -let fetch = { file, sha256 }: - let - nixFetchurl = import <nix/fetchurl.nix>; - args = { - url = "file://${builtins.toString ./.}/${file}"; - inherit sha256; - executable = true; - }; - in if (builtins.functionArgs nixFetchurl) ? executable - then nixFetchurl args - else derivation { - name = file; - builder = "/bin/sh"; +let - system = builtins.currentSystem; - - args = [ "-c" "echo $message; exit 1" ]; - - message = '' - Sorry, this version of nix cannot download all of the bootstrap tools. - Please download ${args.url}, make it executable, add it to the store - with `nix-store --add', and try again. - ''; - - outputHashAlgo = "sha256"; - - outputHash = args.sha256; - - outputHashMode = "recursive"; + fetch = { file, sha256 }: import <nix/fetchurl.nix> { + url = "http://tarballs.nixos.org/stdenv-linux/armv5tel/r18744/${file}"; + inherit sha256; + executable = true; + }; - preferLocalBuild = true; - }; in { sh = fetch { file = "sh"; diff --git a/pkgs/stdenv/linux/bootstrap/armv5tel/ln b/pkgs/stdenv/linux/bootstrap/armv5tel/ln deleted file mode 100755 index f2c0db1640108..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/armv5tel/ln +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/armv5tel/mkdir b/pkgs/stdenv/linux/bootstrap/armv5tel/mkdir deleted file mode 100755 index c551673d32a52..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/armv5tel/mkdir +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/armv5tel/sh b/pkgs/stdenv/linux/bootstrap/armv5tel/sh deleted file mode 100755 index 74d82aa94f202..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/armv5tel/sh +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/i686/bzip2 b/pkgs/stdenv/linux/bootstrap/i686/bzip2 deleted file mode 100755 index 6cd5273c3336f..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/i686/bzip2 +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/i686/cpio b/pkgs/stdenv/linux/bootstrap/i686/cpio deleted file mode 100755 index 387b67664f6c6..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/i686/cpio +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/i686/curl.bz2 b/pkgs/stdenv/linux/bootstrap/i686/curl.bz2 deleted file mode 100755 index a6dd7502b5a34..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/i686/curl.bz2 +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/i686/default.nix b/pkgs/stdenv/linux/bootstrap/i686/default.nix index 9c78dcc7b2fa4..7b6b3ee803443 100644 --- a/pkgs/stdenv/linux/bootstrap/i686/default.nix +++ b/pkgs/stdenv/linux/bootstrap/i686/default.nix @@ -1,36 +1,11 @@ let - fetch = { file, sha256 }: - let - nixFetchurl = import <nix/fetchurl.nix>; - args = { - url = "file://${builtins.toString ./.}/${file}"; - inherit sha256; - executable = true; - }; - in if (builtins.functionArgs nixFetchurl) ? executable - then nixFetchurl args - else derivation { - name = file; - builder = "/bin/sh"; - system = builtins.currentSystem; - - args = [ "-c" "echo $message; exit 1" ]; - - message = '' - Sorry, this version of nix cannot download all of the bootstrap tools. - Please download ${args.url}, make it executable, add it to the store - with `nix-store --add', and try again. - ''; - - outputHashAlgo = "sha256"; - - outputHash = args.sha256; - - outputHashMode = "recursive"; + fetch = { file, sha256 }: import <nix/fetchurl.nix> { + url = "http://tarballs.nixos.org/stdenv-linux/i686/r24519/${file}"; + inherit sha256; + executable = true; + }; - preferLocalBuild = true; - }; in { sh = fetch { file = "sh"; @@ -52,11 +27,6 @@ in { sha256 = "046if3aqqramyhrn2yxrjf4bfkl8x1bcqxhvi7ml9nrv9smx8irg"; }; - ln = fetch { - file = "ln"; - sha256 = "06vr474i3x55p0rnqa87yx7dzf4qdfpfg201mks39id43cjm9f8j"; - }; - curl = fetch { file = "curl.bz2"; sha256 = "1v0yfb4gcdyqpl2fxlxjh337r28c23iqm7vwck4p4643xd55di7q"; diff --git a/pkgs/stdenv/linux/bootstrap/i686/ln b/pkgs/stdenv/linux/bootstrap/i686/ln deleted file mode 100755 index 57ddcf8dcf735..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/i686/ln +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/i686/mkdir b/pkgs/stdenv/linux/bootstrap/i686/mkdir deleted file mode 100755 index 18c35db0aff1c..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/i686/mkdir +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/i686/sh b/pkgs/stdenv/linux/bootstrap/i686/sh deleted file mode 100755 index 13e681ed1a9e2..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/i686/sh +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/loongson2f/bzip2 b/pkgs/stdenv/linux/bootstrap/loongson2f/bzip2 deleted file mode 100755 index f86964d119c28..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/loongson2f/bzip2 +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/loongson2f/cpio b/pkgs/stdenv/linux/bootstrap/loongson2f/cpio deleted file mode 100755 index bf6fd66be2383..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/loongson2f/cpio +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/loongson2f/curl.bz2 b/pkgs/stdenv/linux/bootstrap/loongson2f/curl.bz2 deleted file mode 100755 index f227a24bf7188..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/loongson2f/curl.bz2 +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/loongson2f/default.nix b/pkgs/stdenv/linux/bootstrap/loongson2f/default.nix index e49b09eb23cb4..8e22a274974a1 100644 --- a/pkgs/stdenv/linux/bootstrap/loongson2f/default.nix +++ b/pkgs/stdenv/linux/bootstrap/loongson2f/default.nix @@ -1,36 +1,11 @@ let - fetch = { file, sha256 }: - let - nixFetchurl = import <nix/fetchurl.nix>; - args = { - url = "file://${builtins.toString ./.}/${file}"; - inherit sha256; - executable = true; - }; - in if (builtins.functionArgs nixFetchurl) ? executable - then nixFetchurl args - else derivation { - name = file; - builder = "/bin/sh"; - system = builtins.currentSystem; - - args = [ "-c" "echo $message; exit 1" ]; - - message = '' - Sorry, this version of nix cannot download all of the bootstrap tools. - Please download ${args.url}, make it executable, add it to the store - with `nix-store --add', and try again. - ''; - - outputHashAlgo = "sha256"; - - outputHash = args.sha256; - - outputHashMode = "recursive"; + fetch = { file, sha256 }: import <nix/fetchurl.nix> { + url = "http://tarballs.nixos.org/stdenv-linux/loongson2f/r22849/${file}"; + inherit sha256; + executable = true; + }; - preferLocalBuild = true; - }; in { sh = fetch { file = "sh"; diff --git a/pkgs/stdenv/linux/bootstrap/loongson2f/ln b/pkgs/stdenv/linux/bootstrap/loongson2f/ln deleted file mode 100755 index d8afd276424f1..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/loongson2f/ln +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/loongson2f/mkdir b/pkgs/stdenv/linux/bootstrap/loongson2f/mkdir deleted file mode 100755 index 3a95ccf18d6e5..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/loongson2f/mkdir +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/loongson2f/sh b/pkgs/stdenv/linux/bootstrap/loongson2f/sh deleted file mode 100755 index f8ef0a74d6bf9..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/loongson2f/sh +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/powerpc/bash b/pkgs/stdenv/linux/bootstrap/powerpc/bash deleted file mode 100755 index 7e3e0a5c79bb3..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/powerpc/bash +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/powerpc/bzip2 b/pkgs/stdenv/linux/bootstrap/powerpc/bzip2 deleted file mode 100755 index a9eb626e1ca2a..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/powerpc/bzip2 +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/powerpc/cp b/pkgs/stdenv/linux/bootstrap/powerpc/cp deleted file mode 100755 index 972a653851c1e..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/powerpc/cp +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/powerpc/curl.bz2 b/pkgs/stdenv/linux/bootstrap/powerpc/curl.bz2 deleted file mode 100755 index 4f0d64341e8ab..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/powerpc/curl.bz2 +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/bootstrap/powerpc/default.nix b/pkgs/stdenv/linux/bootstrap/powerpc/default.nix deleted file mode 100644 index 4ad8bc93e4426..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/powerpc/default.nix +++ /dev/null @@ -1,79 +0,0 @@ -let - fetch = { file, sha256 }: - let - nixFetchurl = import <nix/fetchurl.nix>; - args = { - url = "file://${builtins.toString ./.}/${file}"; - inherit sha256; - executable = true; - }; - in if (builtins.functionArgs nixFetchurl) ? executable - then nixFetchurl args - else derivation { - name = file; - builder = "/bin/sh"; - - system = builtins.currentSystem; - - args = [ "-c" "echo $message; exit 1" ]; - - message = '' - Sorry, this version of nix cannot download all of the bootstrap tools. - Please download ${args.url}, make it executable, add it to the store - with `nix-store --add', and try again. - ''; - - outputHashAlgo = "sha256"; - - outputHash = args.sha256; - - outputHashMode = "recursive"; - - preferLocalBuild = true; - }; -in { - bash = fetch { - file = "bash"; - sha256 = "0zss8im6hbx6z2i2wxn1554kd7ggdqdli4xk39cy5fchlnz9bqpp"; - }; - - bzip2 = fetch { - file = "bzip2"; - sha256 = "01ylj8x7albv6k9sqx2h1prsazh4d8y22nga0pwai2bnns0q9qdg"; - }; - - cp = fetch { - file = "cp"; - sha256 = "0d7xbzrv22bxgw7w9b03rakirna5zfvr9gzwm7ichd2fh634hvgl"; - }; - - curl = fetch { - file = "curl.bz2"; - sha256 = "17c25dfslw3qkjlcmihpbhn3x4kj9pgkslizv89ggnki7iiy4jgh"; - }; - - tar = fetch { - file = "tar.bz2"; - sha256 = "132ylqwz02hw5njqx7wvj4sxpcrllx8b8b3a00rlv6iad671ayyr"; - }; - - staticToolsURL = { - url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/static-tools.tar.bz2; - sha1 = "e4d1680e3dfa752e49a996a31140db53b10061cb"; - }; - - binutilsURL = { - url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/binutils.tar.bz2; - sha1 = "2609f4d9277a60fcd178395d3d49911190e08f36"; - }; - - gccURL = { - url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/gcc.tar.bz2; - sha1 = "71d79d736bfef6252208fe6239e528a591becbed"; - }; - - glibcURL = { - url = http://tarballs.nixos.org/stdenv-linux/powerpc/r9828/glibc.tar.bz2; - sha1 = "bf0245e16235800c8aa9c6a5de6565583a66e46d"; - }; -} diff --git a/pkgs/stdenv/linux/bootstrap/powerpc/tar.bz2 b/pkgs/stdenv/linux/bootstrap/powerpc/tar.bz2 deleted file mode 100755 index c014e9cc044ea..0000000000000 --- a/pkgs/stdenv/linux/bootstrap/powerpc/tar.bz2 +++ /dev/null Binary files differdiff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 0aa0a9a840b4e..02635bf1fd5d3 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -16,7 +16,6 @@ rec { bootstrapFiles = if system == "i686-linux" then import ./bootstrap/i686 else if system == "x86_64-linux" then import ./bootstrap/x86_64 - else if system == "powerpc-linux" then import ./bootstrap/powerpc else if system == "armv5tel-linux" then import ./bootstrap/armv5tel else if system == "armv6l-linux" then import ./bootstrap/armv6l else if system == "armv7l-linux" then import ./bootstrap/armv6l @@ -52,6 +51,7 @@ rec { then [ ./scripts/unpack-bootstrap-tools-arm.sh ] else [ ./scripts/unpack-bootstrap-tools.sh ]; + # FIXME: get rid of curl. inherit (bootstrapFiles) bzip2 mkdir curl cpio; tarball = import <nix/fetchurl.nix> { |