fetchFromGitiles
pkgs.fetchFromGitiles
Functor
Docs pulled from | This Revision | about 1 hour ago
No reference documentation found yet.
Contribute now!
Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.
Noogle detected
This is a Functor
Learn about functors
Implementation
The following is the current implementation of this function.
{
url,
rev ? null,
tag ? null,
name ? "source",
...
}@args:
assert (
lib.assertMsg (lib.xor (tag == null) (
rev == null
)) "fetchFromGitiles requires one of either `rev` or `tag` to be provided (not both)."
);
let
realrev = (if tag != null then "refs/tags/" + tag else rev);
in
fetchzip (
{
inherit name;
url = "${url}/+archive/${realrev}.tar.gz";
stripRoot = false;
meta.homepage = url;
}
// removeAttrs args [
"url"
"tag"
"rev"
]
)
// {
inherit rev tag;
}