From 07b26ce4939a6b4469085e87ce18573787968715 Mon Sep 17 00:00:00 2001 From: Gergely Risko Date: Thu, 16 May 2013 10:18:12 +0200 Subject: [PATCH] fetchUrl: add curlOpts parameter (merge #535) --- pkgs/build-support/fetchurl/builder.sh | 1 + pkgs/build-support/fetchurl/default.nix | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchurl/builder.sh b/pkgs/build-support/fetchurl/builder.sh index 177b1e016a6..402fe0cba5b 100644 --- a/pkgs/build-support/fetchurl/builder.sh +++ b/pkgs/build-support/fetchurl/builder.sh @@ -13,6 +13,7 @@ curl="curl \ --disable-epsv \ --cookie-jar cookies \ --insecure \ + $curlOpts \ $NIX_CURL_FLAGS" diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index 09816d9ba8e..6c981229531 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -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.