fetchUrl: add curlOpts parameter (merge #535)
This commit is contained in:
parent
951f5be7d9
commit
07b26ce493
|
@ -13,6 +13,7 @@ curl="curl \
|
||||||
--disable-epsv \
|
--disable-epsv \
|
||||||
--cookie-jar cookies \
|
--cookie-jar cookies \
|
||||||
--insecure \
|
--insecure \
|
||||||
|
$curlOpts \
|
||||||
$NIX_CURL_FLAGS"
|
$NIX_CURL_FLAGS"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,9 @@ in
|
||||||
# locations. They are tried in order.
|
# locations. They are tried in order.
|
||||||
urls ? []
|
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
|
, # Name of the file. If empty, use the basename of `url' (or of the
|
||||||
# first element of `urls').
|
# first element of `urls').
|
||||||
name ? ""
|
name ? ""
|
||||||
|
@ -97,7 +100,7 @@ stdenv.mkDerivation {
|
||||||
outputHash = if outputHash != "" then outputHash else
|
outputHash = if outputHash != "" then outputHash else
|
||||||
if sha256 != "" then sha256 else if sha1 != "" then sha1 else md5;
|
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
|
# Doing the download on a remote machine just duplicates network
|
||||||
# traffic, so don't do that.
|
# traffic, so don't do that.
|
||||||
|
|
Loading…
Reference in New Issue