diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e3cb6069caf8..efce3051f064 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 = {