nixpkgs/pkgs/build-support/fetchsavannah/default.nix
Lin Jian cf3f6beff7
fetchFromSavannah: add passthru.gitRepoUrl
This can be used by update scripts such as unstableGitUpdater[1].

[1]: 1dcca7a82a/pkgs/common-updater/unstable-updater.nix (L15)
2024-10-29 18:11:52 +08:00

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; }
)