fetchgitlab: make args more similar to fetchgithub
This commit is contained in:
parent
27640d4921
commit
9375cf2008
2 changed files with 5 additions and 4 deletions
|
@ -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";
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue