fetchFromGitiles: init
This has the same motivation as fetchFromGitHub/fetchFromGitLab -- it's cheaper to download a tarball of a single revision than it is to download a whole history. I could have gone with domain/group/repo, like fetchFromGitLab, but it would have made implementation more difficult, and this syntax means it's a drop-in replacement for fetchgit, so I decided it wasn't worth it.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
{ fetchzip, lib }:
|
||||
|
||||
{ url, rev, name ? "source", ... } @ args:
|
||||
|
||||
fetchzip ({
|
||||
inherit name;
|
||||
url = "${url}/+archive/${rev}.tar.gz";
|
||||
stripRoot = false;
|
||||
meta.homepage = url;
|
||||
} // removeAttrs args [ "url" "rev" ]) // { inherit rev; }
|
||||
Reference in New Issue
Block a user