fetchFromSavannah: support repos like emacs/elpa (#392142)

This commit is contained in:
Lin Jian
2025-03-31 20:21:03 +08:00
committed by GitHub
+5 -1
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";
}