diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-20 00:46:22 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-20 00:54:09 +0200 |
commit | c49404547bc3315953baa563347beb9034bc7512 (patch) | |
tree | 3bc338209c978f9fbe69bc6b36b2235582b47455 /pkgs/stdenv | |
parent | c95cea4bfd91d1ef6cda0da3e5604909ff7a05c5 (diff) | |
download | nixlib-c49404547bc3315953baa563347beb9034bc7512.tar nixlib-c49404547bc3315953baa563347beb9034bc7512.tar.gz nixlib-c49404547bc3315953baa563347beb9034bc7512.tar.bz2 nixlib-c49404547bc3315953baa563347beb9034bc7512.tar.lz nixlib-c49404547bc3315953baa563347beb9034bc7512.tar.xz nixlib-c49404547bc3315953baa563347beb9034bc7512.tar.zst nixlib-c49404547bc3315953baa563347beb9034bc7512.zip |
Use <nix/fetchurl.nix> to download the bootstrap tools
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 15 | ||||
-rw-r--r-- | pkgs/stdenv/linux/scripts/download.sh | 8 |
2 files changed, 1 insertions, 22 deletions
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 3d424c904ba4..0aa0a9a840b4 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -40,19 +40,6 @@ rec { # of coreutils, GCC, etc. - # This function downloads a file. - download = {url, sha256}: derivation { - name = baseNameOf (toString url); - builder = bootstrapFiles.sh; - inherit system url; - inherit (bootstrapFiles) bzip2 mkdir curl cpio ln; - args = [ ./scripts/download.sh ]; - outputHashAlgo = "sha256"; - outputHash = sha256; - impureEnvVars = [ "http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy" ]; - }; - - # Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...). bootstrapTools = derivation { name = "bootstrap-tools"; @@ -67,7 +54,7 @@ rec { inherit (bootstrapFiles) bzip2 mkdir curl cpio; - tarball = download { + tarball = import <nix/fetchurl.nix> { inherit (bootstrapFiles.bootstrapTools) url sha256; }; diff --git a/pkgs/stdenv/linux/scripts/download.sh b/pkgs/stdenv/linux/scripts/download.sh deleted file mode 100644 index e7594f208ea1..000000000000 --- a/pkgs/stdenv/linux/scripts/download.sh +++ /dev/null @@ -1,8 +0,0 @@ -set -e - -$ln -s $curl curl.bz2 -$bzip2 -d -f curl.bz2 -./curl --version - -echo "downloading $out from $url" -./curl --fail --location --max-redirs 20 "$url" > "$out" |