summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Benes <nbenes.gh@xandea.de>2023-11-18 13:14:08 +0100
committerNicolas Benes <nbenes.gh@xandea.de>2023-11-18 13:14:08 +0100
commit9375cf20083c296b6db94f8534b3372c21f0cb69 (patch)
treedf44c070d58f10bcb66ca88ce71881bd75d57f5b
parent27640d492172b5d9fe8c2e16a638e799ab4a99f2 (diff)
fetchgitlab: make args more similar to fetchgithub
-rw-r--r--pkgs/build-support/fetchgitlab/default.nix7
-rw-r--r--pkgs/build-support/fetchzip/default.nix2
2 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/build-support/fetchgitlab/default.nix b/pkgs/build-support/fetchgitlab/default.nix
index 146845e06a71..69361fcbdf81 100644
--- a/pkgs/build-support/fetchgitlab/default.nix
+++ b/pkgs/build-support/fetchgitlab/default.nix
@@ -1,9 +1,10 @@
-{ fetchgit, fetchzip, lib }:
+{ lib, fetchgit, fetchzip }:
lib.makeOverridable (
# gitlab example
{ owner, repo, rev, protocol ? "https", domain ? "gitlab.com", name ? "source", group ? null
-, fetchSubmodules ? false, leaveDotGit ? false, deepClone ? false
+, fetchSubmodules ? false, leaveDotGit ? false
+, deepClone ? false
, ... # For hash agility
} @ args:
@@ -13,7 +14,7 @@ let
escapedRev = lib.replaceStrings [ "+" "%" "/" ] [ "%2B" "%25" "%2F" ] rev;
passthruAttrs = removeAttrs args [ "protocol" "domain" "owner" "group" "repo" "rev" "fetchSubmodules" "leaveDotGit" "deepClone" ];
- useFetchGit = deepClone || fetchSubmodules || leaveDotGit;
+ useFetchGit = fetchSubmodules || leaveDotGit || deepClone;
fetcher = if useFetchGit then fetchgit else fetchzip;
gitRepoUrl = "${protocol}://${domain}/${slug}.git";
diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix
index 0446851d6409..6e6c5270a750 100644
--- a/pkgs/build-support/fetchzip/default.nix
+++ b/pkgs/build-support/fetchzip/default.nix
@@ -24,7 +24,7 @@
# the rest are given to fetchurl as is
, ... } @ args:
-assert (extraPostFetch != "") -> lib.warn "use 'postFetch' instead of 'extraPostFetch' with 'fetchzip' and 'fetchFromGitHub'." true;
+assert (extraPostFetch != "") -> lib.warn "use 'postFetch' instead of 'extraPostFetch' with 'fetchzip' and 'fetchFromGitHub' or 'fetchFromGitLab'." true;
let
tmpFilename =