diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2007-03-02 19:07:36 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2007-03-02 19:07:36 +0000 |
commit | 2d33b25877e27628191ff3081c6abe2cb1f58784 (patch) | |
tree | ea55765ebe4235f293819e18626c2210bea72e77 /pkgs/build-support/fetchurl/default.nix | |
parent | 2e2daff8ab4c6a18e22995e93f5492d32fb94ca7 (diff) | |
download | nixlib-2d33b25877e27628191ff3081c6abe2cb1f58784.tar nixlib-2d33b25877e27628191ff3081c6abe2cb1f58784.tar.gz nixlib-2d33b25877e27628191ff3081c6abe2cb1f58784.tar.bz2 nixlib-2d33b25877e27628191ff3081c6abe2cb1f58784.tar.lz nixlib-2d33b25877e27628191ff3081c6abe2cb1f58784.tar.xz nixlib-2d33b25877e27628191ff3081c6abe2cb1f58784.tar.zst nixlib-2d33b25877e27628191ff3081c6abe2cb1f58784.zip |
* fetchurl: accept an optional name. Useful for file names that contain
unacceptable characters (such as ? on Windows). svn path=/nixpkgs/trunk/; revision=8149
Diffstat (limited to 'pkgs/build-support/fetchurl/default.nix')
-rw-r--r-- | pkgs/build-support/fetchurl/default.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index e4a4694404ea..b6eec09c13bf 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -3,13 +3,13 @@ {stdenv, curl}: # Note that `curl' may be `null', in case of the native stdenv. -{url, outputHash ? "", outputHashAlgo ? "", md5 ? "", sha1 ? "", sha256 ? ""}: +{name ? "", url, outputHash ? "", outputHashAlgo ? "", md5 ? "", sha1 ? "", sha256 ? ""}: assert (outputHash != "" && outputHashAlgo != "") || md5 != "" || sha1 != "" || sha256 != ""; stdenv.mkDerivation { - name = baseNameOf (toString url); + name = if name != "" then name else baseNameOf (toString url); builder = ./builder.sh; buildInputs = [curl]; |