From 04b8e12ec7686657d409d3be573c0b85012f7a3b Mon Sep 17 00:00:00 2001 From: Mike Purvis Date: Wed, 15 Sep 2021 17:33:20 +0000 Subject: fetchFromGitLab: Allow overriding protocol --- pkgs/build-support/fetchgitlab/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/fetchgitlab/default.nix b/pkgs/build-support/fetchgitlab/default.nix index 5b9dbd71c59..9ee0b3ca368 100644 --- a/pkgs/build-support/fetchgitlab/default.nix +++ b/pkgs/build-support/fetchgitlab/default.nix @@ -1,7 +1,7 @@ { fetchgit, fetchzip, lib }: # gitlab example -{ owner, repo, rev, domain ? "gitlab.com", name ? "source", group ? null +{ owner, repo, rev, protocol ? "https", domain ? "gitlab.com", name ? "source", group ? null , fetchSubmodules ? false, leaveDotGit ? false, deepClone ? false , ... # For hash agility } @ args: @@ -17,10 +17,10 @@ let fetcherArgs = (if useFetchGit then { inherit rev deepClone fetchSubmodules leaveDotGit; - url = "https://${domain}/${slug}.git"; + url = "${protocol}://${domain}/${slug}.git"; } else { - url = "https://${domain}/api/v4/projects/${escapedSlug}/repository/archive.tar.gz?sha=${escapedRev}"; + url = "${protocol}://${domain}/api/v4/projects/${escapedSlug}/repository/archive.tar.gz?sha=${escapedRev}"; }) // passthruAttrs // { inherit name; }; in -fetcher fetcherArgs // { meta.homepage = "https://${domain}/${slug}/"; inherit rev; } +fetcher fetcherArgs // { meta.homepage = "${protocol}://${domain}/${slug}/"; inherit rev; } -- cgit 1.4.1