fetchFromGitLab: add a group optional argument
For example, paperwork is at https://gitlab.gnome.org/World/OpenPaperwork/paperwork and you can fetch this repo with group = "World", owner = "OpenPaperwork", and repo = "paperwork".
This commit is contained in:
parent
ca2ba44cab
commit
c3612b97e6
@ -288,13 +288,13 @@ with pkgs;
|
|||||||
|
|
||||||
# gitlab example
|
# gitlab example
|
||||||
fetchFromGitLab = {
|
fetchFromGitLab = {
|
||||||
owner, repo, rev, domain ? "gitlab.com", name ? "source",
|
owner, repo, rev, domain ? "gitlab.com", name ? "source", group ? null,
|
||||||
... # For hash agility
|
... # For hash agility
|
||||||
}@args: fetchzip ({
|
}@args: fetchzip ({
|
||||||
inherit name;
|
inherit name;
|
||||||
url = "https://${domain}/api/v4/projects/${owner}%2F${repo}/repository/archive.tar.gz?sha=${rev}";
|
url = "https://${domain}/api/v4/projects/${lib.optionalString (group != null) group+"%2F"}${owner}%2F${repo}/repository/archive.tar.gz?sha=${rev}";
|
||||||
meta.homepage = "https://${domain}/${owner}/${repo}/";
|
meta.homepage = "https://${domain}/${lib.optionalString (group != null) group+"/"}${owner}/${repo}/";
|
||||||
} // removeAttrs args [ "domain" "owner" "repo" "rev" ]) // { inherit rev; };
|
} // removeAttrs args [ "domain" "owner" "group" "repo" "rev" ]) // { inherit rev; };
|
||||||
|
|
||||||
# gitweb example, snapshot support is optional in gitweb
|
# gitweb example, snapshot support is optional in gitweb
|
||||||
fetchFromRepoOrCz = {
|
fetchFromRepoOrCz = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user