mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 17:25:11 +00:00
fe16f7d7f9
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.
11 lines
236 B
Nix
11 lines
236 B
Nix
{ 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; }
|