nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 38 lines 961 B view raw
1{ 2 lib, 3 repoRevToNameMaybe, 4 fetchzip, 5}: 6 7lib.makeOverridable ( 8 # cgit example, snapshot support is optional in cgit 9 { 10 repo, 11 rev, 12 name ? repoRevToNameMaybe repo rev "savannah", 13 ... # For hash agility 14 }@args: 15 let 16 result = 17 fetchzip ( 18 { 19 inherit name; 20 url = 21 let 22 repo' = lib.last (lib.strings.splitString "/" repo); # support repo like emacs/elpa 23 in 24 "https://cgit.git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo'}-${rev}.tar.gz"; 25 meta.homepage = "https://cgit.git.savannah.gnu.org/cgit/${repo}.git/"; 26 passthru.gitRepoUrl = "https://cgit.git.savannah.gnu.org/git/${repo}.git"; 27 } 28 // removeAttrs args [ 29 "repo" 30 "rev" 31 ] 32 ) 33 // { 34 inherit rev; 35 }; 36 in 37 lib.warnOnInstantiate "`fetchFromSavannah` is deprecated and will be removed in a future release." result 38)