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:
parent
a8508f7266
commit
fe16f7d7f9
@ -105,6 +105,17 @@ stdenv.mkDerivation {
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>fetchFromGitiles</literal>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
This is used with Gitiles repositories. The arguments expected
|
||||
are similar to fetchgit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>fetchFromBitbucket</literal>
|
||||
|
10
pkgs/build-support/fetchgitiles/default.nix
Normal file
10
pkgs/build-support/fetchgitiles/default.nix
Normal file
@ -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; }
|
@ -358,6 +358,8 @@ in
|
||||
|
||||
fetchFromGitLab = callPackage ../build-support/fetchgitlab {};
|
||||
|
||||
fetchFromGitiles = callPackage ../build-support/fetchgitiles {};
|
||||
|
||||
fetchFromRepoOrCz = callPackage ../build-support/fetchrepoorcz {};
|
||||
|
||||
fetchNuGet = callPackage ../build-support/fetchnuget { };
|
||||
|
Loading…
Reference in New Issue
Block a user