@@ -4364,26 +4364,30 @@ (define-public git-sizer
"1b4sl4djnfaxwph41y4bh9yal4bpd1nz4403ryp7nzna7h2x0zis"))))
(build-system go-build-system)
(arguments
- '(#:import-path "github.com/github/git-sizer"
- #:install-source? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-paths
- (lambda* (#:key outputs #:allow-other-keys)
- (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
- (("bin/git-sizer")
- (string-append (assoc-ref outputs "out")
- "/bin/git-sizer")))))
- (replace 'check
- (lambda* (#:key tests? import-path #:allow-other-keys)
- (when tests?
- (for-each (lambda (test)
- (invoke "go" "test" "-v" "-run" test import-path))
- ;; TestExec and TestSubmodule require a copy of the
- ;; Git repository.
- '("TestBomb" "TestFromSubdir" "TestRefgroups"
- "TestRefSelections" "TestTaggedTags"))))))))
- (native-inputs (list git))
+ (list
+ #:import-path "github.com/github/git-sizer"
+ #:install-source? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda _
+ (let ((git #$git-minimal/pinned))
+ (substitute* '("src/github.com/github/git-sizer/git_sizer_test.go")
+ (("bin/git-sizer")
+ (string-append #$output "/bin/git-sizer")))
+ (substitute* '("src/github.com/github/git-sizer/git/git.go")
+ (("gitBin, err := findGitBin\\(\\)")
+ (string-append "gitBin := \"" git "/bin/git\"\n\tvar err error"))))))
+ (replace 'check
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (when tests?
+ (for-each (lambda (test)
+ (invoke "go" "test" "-v" "-run" test import-path))
+ ;; TestExec and TestSubmodule require a copy of the
+ ;; Git repository.
+ '("TestBomb" "TestFromSubdir" "TestRefgroups"
+ "TestRefSelections" "TestTaggedTags"))))))))
+ (inputs (list git-minimal/pinned))
(propagated-inputs
(list go-github-com-cli-safeexec
go-github-com-davecgh-go-spew