fetchUrl: add curlOpts parameter (merge #535)

This commit is contained in:
Gergely Risko 2013-05-16 10:18:12 +02:00 committed by Vladimír Čunát
parent 951f5be7d9
commit 07b26ce493
2 changed files with 5 additions and 1 deletions

View File

@ -13,6 +13,7 @@ curl="curl \
--disable-epsv \
--cookie-jar cookies \
--insecure \
$curlOpts \
$NIX_CURL_FLAGS"

View File

@ -47,6 +47,9 @@ in
# locations. They are tried in order.
urls ? []
, # Additional curl options needed for the download to succeed.
curlOpts ? ""
, # Name of the file. If empty, use the basename of `url' (or of the
# first element of `urls').
name ? ""
@ -97,7 +100,7 @@ stdenv.mkDerivation {
outputHash = if outputHash != "" then outputHash else
if sha256 != "" then sha256 else if sha1 != "" then sha1 else md5;
inherit showURLs mirrorsFile impureEnvVars;
inherit curlOpts showURLs mirrorsFile impureEnvVars;
# Doing the download on a remote machine just duplicates network
# traffic, so don't do that.