fetchFromGitlab: domain can be specified
This commit is contained in:
parent
273c882f53
commit
097937330a
1 changed files with 4 additions and 4 deletions
|
@ -286,13 +286,13 @@ with pkgs;
|
||||||
|
|
||||||
# gitlab example
|
# gitlab example
|
||||||
fetchFromGitLab = {
|
fetchFromGitLab = {
|
||||||
owner, repo, rev, name ? "source",
|
owner, repo, rev, domain ? "gitlab.com", name ? "source",
|
||||||
... # For hash agility
|
... # For hash agility
|
||||||
}@args: fetchzip ({
|
}@args: fetchzip ({
|
||||||
inherit name;
|
inherit name;
|
||||||
url = "https://gitlab.com/api/v4/projects/${owner}%2F${repo}/repository/archive.tar.gz?sha=${rev}";
|
url = "https://${domain}/api/v4/projects/${owner}%2F${repo}/repository/archive.tar.gz?sha=${rev}";
|
||||||
meta.homepage = "https://gitlab.com/${owner}/${repo}/";
|
meta.homepage = "https://${domain}/${owner}/${repo}/";
|
||||||
} // removeAttrs args [ "owner" "repo" "rev" ]) // { inherit rev; };
|
} // removeAttrs args [ "domain" "owner" "repo" "rev" ]) // { inherit rev; };
|
||||||
|
|
||||||
# gitweb example, snapshot support is optional in gitweb
|
# gitweb example, snapshot support is optional in gitweb
|
||||||
fetchFromRepoOrCz = {
|
fetchFromRepoOrCz = {
|
||||||
|
|
Loading…
Reference in a new issue