summaryrefslogtreecommitdiff
path: root/pkgs/build-support/fetchgit
diff options
context:
space:
mode:
authorYueh-Shun Li <shamrocklee@posteo.net>2025-10-29 21:59:05 +0800
committerYueh-Shun Li <shamrocklee@posteo.net>2025-11-03 21:31:04 +0800
commit21677a6bd861ff4b15389dc909bae58201de86ec (patch)
tree197b50da5343acb93c1467c733b9468820a019a6 /pkgs/build-support/fetchgit
parentfetchgit: pass tag directly and make overridable (diff)
downloadnixpkgs-21677a6bd861ff4b15389dc909bae58201de86ec.tar.gz
fetchgit: pass rev as revCustom and make overridable
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 9b6085f1c7fd..445b11347c63 100644
--- a/pkgs/build-support/fetchgit/default.nix
+++ b/pkgs/build-support/fetchgit/default.nix
@@ -62,7 +62,7 @@ lib.makeOverridable (
rev ? null,
name ? urlToName {
inherit url;
- rev = lib.revOrTag rev finalAttrs.tag;
+ rev = lib.revOrTag finalAttrs.revCustom finalAttrs.tag;
# when rootDir is specified, avoid invalidating the result when rev changes
append = if rootDir != "" then "-${lib.strings.sanitizeDerivationName rootDir}" else "";
},
@@ -174,9 +174,10 @@ lib.makeOverridable (
gitConfigFile
;
inherit tag;
+ revCustom = rev;
rev = getRevWithTag {
inherit (finalAttrs) tag;
- inherit rev;
+ rev = finalAttrs.revCustom;
};
postHook =