* 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

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];

View file

@ -13,8 +13,8 @@ stdenv.mkDerivation {
# Process Requires.private properly, see
# http://bugs.freedesktop.org/show_bug.cgi?id=4738.
(fetchurl {
# http://bugs.freedesktop.org/attachment.cgi?id=8494
url = http://losser.st-lab.cs.uu.nl/~mbravenb/mirror/pkg-config.patch;
name = "pkgconfig-8494.patch";
url = http://bugs.freedesktop.org/attachment.cgi?id=8494;
sha256 = "1pcrdbb7dypg2biy0yqc7bdxak5zii8agqljdvk7j4wbyghpqzws";
})
];