1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

Merge pull request #41265 from worldofpeace/fetchfromgitlab-domain

fetchFromGitlab: domain can be specified
This commit is contained in:
Matthew Justin Bauer 2018-05-30 19:24:04 -04:00 committed by GitHub
commit 04bd841d1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -286,13 +286,13 @@ with pkgs;
# gitlab example
fetchFromGitLab = {
owner, repo, rev, name ? "source",
owner, repo, rev, domain ? "gitlab.com", name ? "source",
... # For hash agility
}@args: fetchzip ({
inherit name;
url = "https://gitlab.com/api/v4/projects/${owner}%2F${repo}/repository/archive.tar.gz?sha=${rev}";
meta.homepage = "https://gitlab.com/${owner}/${repo}/";
} // removeAttrs args [ "owner" "repo" "rev" ]) // { inherit rev; };
url = "https://${domain}/api/v4/projects/${owner}%2F${repo}/repository/archive.tar.gz?sha=${rev}";
meta.homepage = "https://${domain}/${owner}/${repo}/";
} // removeAttrs args [ "domain" "owner" "repo" "rev" ]) // { inherit rev; };
# gitweb example, snapshot support is optional in gitweb
fetchFromRepoOrCz = {