summaryrefslogtreecommitdiff
path: root/pkgs/build-support/fetchgit
diff options
context:
space:
mode:
authorYueh-Shun Li <shamrocklee@posteo.net>2025-11-17 03:39:53 +0800
committerYueh-Shun Li <shamrocklee@posteo.net>2025-12-04 15:22:33 +0800
commit6c5dc5d57f446a9c65d01699a9b16963d54d4e06 (patch)
treed7b643be429a977df0f5dec34d3050156b33f201 /pkgs/build-support/fetchgit
parentfetchFromGitHub: elaborate the fetchSubmodules default choice (diff)
downloadnixpkgs-6c5dc5d57f446a9c65d01699a9b16963d54d4e06.tar.gz
fetchgit: default nonConeMode to null and manage its default internally
Diffstat (limited to 'pkgs/build-support/fetchgit')
-rw-r--r--pkgs/build-support/fetchgit/default.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix
index ef2c2cd43093..eac73f713c74 100644
--- a/pkgs/build-support/fetchgit/default.nix
+++ b/pkgs/build-support/fetchgit/default.nix
@@ -74,7 +74,8 @@ lib.makeOverridable (
deepClone ? false,
branchName ? null,
sparseCheckout ? lib.optional (rootDir != "") rootDir,
- nonConeMode ? rootDir != "",
+ # When null, will default to: `rootDir != ""`
+ nonConeMode ? null,
nativeBuildInputs ? [ ],
# Shell code executed before the file has been fetched. This, in
# particular, can do things like set NIX_PREFETCH_GIT_CHECKOUT_HOOK to
@@ -164,7 +165,6 @@ lib.makeOverridable (
fetchSubmodules
deepClone
branchName
- nonConeMode
preFetch
postFetch
fetchTags
@@ -178,6 +178,7 @@ lib.makeOverridable (
leaveDotGit
else
deepClone || fetchTags;
+ nonConeMode = lib.defaultTo (rootDir != "") nonConeMode;
inherit tag;
revCustom = rev;
rev = getRevWithTag {