mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 00:08:32 +01:00
b3709689db
svn path=/nixpkgs/trunk/; revision=31263
17 lines
446 B
Nix
17 lines
446 B
Nix
{ fetchurl }:
|
|
|
|
{ project, major, minor, patchlevel ? null, 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;
|
|
}
|