fetchFromSavannah: support repos like emacs/elpa

This commit is contained in:
Lin Jian 2025-03-23 00:10:59 +08:00
parent 9846ac5ed2
commit 4f0189e1a8
No known key found for this signature in database
GPG key ID: A6698D36434F75A5

View file

@ -11,7 +11,11 @@ lib.makeOverridable (
fetchzip (
{
inherit name;
url = "https://git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo}-${rev}.tar.gz";
url =
let
repo' = lib.last (lib.strings.splitString "/" repo); # support repo like emacs/elpa
in
"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";
}