From 097937330a00163ed42059c5fdbf4dfe6c237de6 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Wed, 30 May 2018 12:58:51 -0400 Subject: [PATCH] fetchFromGitlab: domain can be specified --- pkgs/top-level/all-packages.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 889d2040dc09..ba182ec54b0d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 = {