3
0
Fork 0
forked from mirrors/nixpkgs

Use <nix/fetchurl.nix> to download the bootstrap tools

This commit is contained in:
Eelco Dolstra 2014-04-20 00:46:22 +02:00
parent c95cea4bfd
commit c49404547b
2 changed files with 1 additions and 22 deletions

View file

@ -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;
};

View file

@ -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"