c130be537b
It just creates correct mirror://gnome/sources/... URL. svn path=/nixpkgs/trunk/; revision=29377
17 lines
439 B
Nix
17 lines
439 B
Nix
{ fetchurl }:
|
|
|
|
{ project, major, minor, patchlevel, extension ? "bz2", sha256 }:
|
|
|
|
let
|
|
baseVersion = "${major}.${minor}";
|
|
version = baseVersion + (if patchlevel != null then ".${patchlevel}" else "");
|
|
name = "${project}-${version}";
|
|
in
|
|
|
|
(fetchurl {
|
|
url = "mirror://gnome/sources/${project}/${baseVersion}/${name}.tar.${extension}";
|
|
inherit sha256;
|
|
}) // {
|
|
inherit major minor patchlevel baseVersion version;
|
|
pkgname = name;
|
|
}
|