elsethrow"fetchurl requires a hash for fixed-output derivation: ${lib.concatStringsSep", "urls_}";
ifoutputHashAlgo!=""then
{inheritoutputHashAlgooutputHash;}
else
throw"fetchurl was passed outputHash without outputHashAlgo"
elseifsha512!=""then
{
outputHashAlgo="sha512";
outputHash=sha512;
}
elseifsha256!=""then
{
outputHashAlgo="sha256";
outputHash=sha256;
}
elseifsha1!=""then
{
outputHashAlgo="sha1";
outputHash=sha1;
}
elseifcacert!=nullthen
{
outputHashAlgo="sha256";
outputHash="";
}
else
throw"fetchurl requires a hash for fixed-output derivation: ${lib.concatStringsSep", "urls_}";
in
assert(lib.isListcurlOpts)->lib.warn''
fetchurl for ${toString(builtins.headurls_)}: curlOpts is a list (${lib.generators.toPretty{multiline=false;}curlOpts}), which is not supported anymore.
assert
(lib.isListcurlOpts)
->lib.warn''
fetchurl for ${toString(builtins.headurls_)}: curlOpts is a list (${
lib.generators.toPretty{multiline=false;}curlOpts
}), which is not supported anymore.
- If you wish to get the same effect as before, for elements with spaces (even if escaped) to expand to multiple curl arguments, use a string argument instead: