Let fetchurl retry failed downloads. Add NIX_CURL_FLAGS impure var

svn path=/nixpkgs/trunk/; revision=22006
This commit is contained in:
Yury G. Kudryashov 2010-05-27 18:59:19 +00:00
parent 25a7c36007
commit 952bc80b4d
2 changed files with 6 additions and 1 deletions

View File

@ -13,9 +13,11 @@ fi
# cryptographic hash of the output anyway).
curl="curl \
--location --max-redirs 20 \
--retry 3
--disable-epsv \
--cookie-jar cookies \
--insecure"
--insecure \
$NIX_CURL_OPTIONS"
tryDownload() {

View File

@ -91,6 +91,9 @@ stdenv.mkDerivation {
# by definition pure.
"http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy"
# This variable allows the user to pass additional options to curl
"NIX_CURL_FLAGS"
# This variable allows the user to override hashedMirrors from the
# command-line.
"NIX_HASHED_MIRRORS"