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
|
||||
fetchFromGitLab = {
|
||||
owner, repo, rev, domain ? "gitlab.com", name ? "source",
|
||||
owner, repo, rev, domain ? "gitlab.com", name ? "source", group ? null,
|
||||
... # For hash agility
|
||||
}@args: fetchzip ({
|
||||
inherit name;
|
||||
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; };
|
||||
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}/${lib.optionalString (group != null) group+"/"}${owner}/${repo}/";
|
||||
} // removeAttrs args [ "domain" "owner" "group" "repo" "rev" ]) // { inherit rev; };
|
||||
|
||||
# gitweb example, snapshot support is optional in gitweb
|
||||
fetchFromRepoOrCz = {
|
||||
|
Loading…
Reference in New Issue
Block a user