mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
cf3f6beff7
This can be used by update scripts such as unstableGitUpdater[1].
[1]: 1dcca7a82a/pkgs/common-updater/unstable-updater.nix (L15)
14 lines
475 B
Nix
14 lines
475 B
Nix
{ fetchzip, lib }:
|
|
|
|
lib.makeOverridable (
|
|
# cgit example, snapshot support is optional in cgit
|
|
{ repo, rev, name ? "source"
|
|
, ... # For hash agility
|
|
}@args: fetchzip ({
|
|
inherit name;
|
|
url = "https://git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo}-${rev}.tar.gz";
|
|
meta.homepage = "https://git.savannah.gnu.org/cgit/${repo}.git/";
|
|
passthru.gitRepoUrl = "https://git.savannah.gnu.org/git/${repo}.git";
|
|
} // removeAttrs args [ "repo" "rev" ]) // { inherit rev; }
|
|
)
|