mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-21 20:49:52 +03:00
Add fetchurl_gnome wrapper
It just creates correct mirror://gnome/sources/... URL. svn path=/nixpkgs/trunk/; revision=29377
This commit is contained in:
parent
c67fde4a47
commit
c130be537b
17
pkgs/build-support/fetchurl/gnome.nix
Normal file
17
pkgs/build-support/fetchurl/gnome.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ 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;
|
||||
}
|
@ -289,6 +289,9 @@ let
|
||||
inherit curl stdenv;
|
||||
};
|
||||
|
||||
# A wrapper around fetchurl that generates miror://gnome URLs automatically
|
||||
fetchurl_gnome = callPackage ../build-support/fetchurl/gnome.nix { };
|
||||
|
||||
# fetchurlBoot is used for curl and its dependencies in order to
|
||||
# prevent a cyclic dependency (curl depends on curl.tar.bz2,
|
||||
# curl.tar.bz2 depends on fetchurl, fetchurl depends on curl). It
|
||||
|
Loading…
Reference in New Issue
Block a user