Subject: [bug#73993] [PATCH v3] gnu: git-sizer: Pin git version.

From: Greg Hogan <[email-masked]>
Date: Mon, 9 Dec 2024 15:30:52 +0000

* gnu/packages/version-control.scm (git-sizer)
[arguments]<#:phases>: Hard-code git path in 'fix-paths.
[native-inputs]: Remove git.
[inputs]: Add git-minimal/pinned.

Change-Id: If6178a0e1c453ea47a1f70cd507639b5be2142b0
---
 gnu/packages/version-control.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 3339e79390..eb9dcfa198 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -4479,7 +4479,12 @@ (define-public git-sizer
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-paths
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* '("src/github.com/github/git-sizer/git/git.go")
+               (("gitBin, err := findGitBin\\(\\)")
+                (string-append "gitBin := \""
+                               (search-input-file inputs "bin/git")
+                               "\"\n\tvar err error")))
              (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
                (("bin/git-sizer")
                 (string-append (assoc-ref outputs "out")
@@ -4493,7 +4498,7 @@ (define-public git-sizer
                          ;; Git repository.
                          '("TestBomb" "TestFromSubdir" "TestRefgroups"
                            "TestRefSelections" "TestTaggedTags"))))))))
-    (native-inputs (list git))
+    (inputs (list git-minimal/pinned))
     (propagated-inputs
      (list go-github-com-cli-safeexec
            go-github-com-davecgh-go-spew

base-commit: 9d09b0cf841fb657a1aec12e9bab68e00c2b493c
-- 
2.46.0