diff options
Diffstat (limited to 'pkgs/build-support/fetchgitlab/default.nix')
-rw-r--r-- | pkgs/build-support/fetchgitlab/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchgitlab/default.nix b/pkgs/build-support/fetchgitlab/default.nix index 5c82a8f8587..264bbcf3f76 100644 --- a/pkgs/build-support/fetchgitlab/default.nix +++ b/pkgs/build-support/fetchgitlab/default.nix @@ -15,11 +15,17 @@ let useFetchGit = deepClone || fetchSubmodules || leaveDotGit; fetcher = if useFetchGit then fetchgit else fetchzip; + gitRepoUrl = "${protocol}://${domain}/${slug}.git"; + fetcherArgs = (if useFetchGit then { inherit rev deepClone fetchSubmodules leaveDotGit; - url = "${protocol}://${domain}/${slug}.git"; + url = gitRepoUrl; } else { url = "${protocol}://${domain}/api/v4/projects/${escapedSlug}/repository/archive.tar.gz?sha=${escapedRev}"; + + passthru = { + inherit gitRepoUrl; + }; }) // passthruAttrs // { inherit name; }; in |