Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 34 lines 752 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 fetchzip ( 16 { 17 inherit name; 18 url = 19 let 20 repo' = lib.last (lib.strings.splitString "/" repo); # support repo like emacs/elpa 21 in 22 "https://cgit.git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo'}-${rev}.tar.gz"; 23 meta.homepage = "https://cgit.git.savannah.gnu.org/cgit/${repo}.git/"; 24 passthru.gitRepoUrl = "https://cgit.git.savannah.gnu.org/git/${repo}.git"; 25 } 26 // removeAttrs args [ 27 "repo" 28 "rev" 29 ] 30 ) 31 // { 32 inherit rev; 33 } 34)