diff options
author | Pavol Rusnak <pavol@rusnak.io> | 2021-10-21 18:12:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-21 18:12:47 +0200 |
commit | e32dde36b0d5e02692f0bfb8309ed67feb982fb8 (patch) | |
tree | 550ab40d56c8da23d6bd651390a365a72e9bb703 /pkgs/build-support | |
parent | e9c9b38d2eb0170717d06975cae587bfa7180ede (diff) | |
parent | 04b8e12ec7686657d409d3be573c0b85012f7a3b (diff) |
Merge pull request #138033 from mikepurvis/allow-gitlab-protocol-override
Allow overriding fetchFromGitLab protocol.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/fetchgitlab/default.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/build-support/fetchgitlab/default.nix b/pkgs/build-support/fetchgitlab/default.nix index 5b9dbd71c5953..9ee0b3ca3686e 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; } |