* fetchurl: accept an optional name. Useful for file names that contain

unacceptable characters (such as ? on Windows).

svn path=/nixpkgs/trunk/; revision=8149
This commit is contained in:
Eelco Dolstra
2007-03-02 19:07:36 +00:00
parent 2e2daff8ab
commit 2d33b25877
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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];