fetchurl: use __structuredAttrs = true and pass curlOptsList directly
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
source "$NIX_ATTRS_SH_FILE"
|
||||
source $mirrorsFile
|
||||
|
||||
curlVersion=$(curl -V | head -1 | cut -d' ' -f2)
|
||||
@@ -22,10 +23,10 @@ if ! [ -f "$SSL_CERT_FILE" ]; then
|
||||
curl+=(--insecure)
|
||||
fi
|
||||
|
||||
eval "curl+=($curlOptsList)"
|
||||
curl+=("${curlOptsList[@]}")
|
||||
|
||||
curl+=(
|
||||
$curlOpts
|
||||
${curlOpts[*]}
|
||||
$NIX_CURL_FLAGS
|
||||
)
|
||||
|
||||
|
||||
@@ -136,6 +136,7 @@ lib.extendMkDerivation {
|
||||
|
||||
# Passthru information, if any.
|
||||
passthru ? { },
|
||||
|
||||
# Doing the download on a remote machine just duplicates network
|
||||
# traffic, so don't do that by default
|
||||
preferLocalBuild ? true,
|
||||
@@ -238,6 +239,8 @@ lib.extendMkDerivation {
|
||||
|
||||
derivationArgs
|
||||
// {
|
||||
__structuredAttrs = true;
|
||||
|
||||
name =
|
||||
if finalAttrs.pname or null != null && finalAttrs.version or null != null then
|
||||
"${finalAttrs.pname}-${finalAttrs.version}"
|
||||
@@ -297,9 +300,8 @@ lib.extendMkDerivation {
|
||||
''
|
||||
) curlOpts;
|
||||
|
||||
curlOptsList = lib.escapeShellArgs curlOptsList;
|
||||
|
||||
inherit
|
||||
curlOptsList
|
||||
downloadToTemp
|
||||
executable
|
||||
mirrorsFile
|
||||
|
||||
Reference in New Issue
Block a user