From c49404547bc3315953baa563347beb9034bc7512 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 20 Apr 2014 00:46:22 +0200 Subject: [PATCH] Use to download the bootstrap tools --- pkgs/stdenv/linux/default.nix | 15 +-------------- pkgs/stdenv/linux/scripts/download.sh | 8 -------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 pkgs/stdenv/linux/scripts/download.sh 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 { 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"