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

Message ID 98c9da16b8fe18f553d46262e2292fcca7bf4699.1733758114.git.code@greghogan.com
State New
Headers
Series [bug#73993,v3] gnu: git-sizer: Pin git version. |

Commit Message

Greg Hogan Dec. 9, 2024, 3:30 p.m. UTC
  * 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(-)


base-commit: 9d09b0cf841fb657a1aec12e9bab68e00c2b493c
  

Patch

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