all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#73993] [PATCH] gnu: git-sizer: Pin git version.
@ 2024-10-24 19:05 Greg Hogan
  2024-11-29  9:40 ` Liliana Marie Prikler
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Greg Hogan @ 2024-10-24 19:05 UTC (permalink / raw)
  To: 73993; +Cc: Greg Hogan

When I submitted this package the placement of git in native-inputs was
incorrect. This patch switches that dependency to the pinned version of
git in inputs and therefore hard-codes the path.

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

Change-Id: Ide0c5a3df7c0cf0ecdaa5446b5d13970dae96560
---
 gnu/packages/version-control.scm | 44 +++++++++++++++++---------------
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 6bd37fee82..78342fbe31 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -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

base-commit: ac19ae37b5000c224c4cd167b239cc3027d01b30
-- 
2.46.1





^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-12-18 11:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-24 19:05 [bug#73993] [PATCH] gnu: git-sizer: Pin git version Greg Hogan
2024-11-29  9:40 ` Liliana Marie Prikler
2024-12-05 21:06   ` Greg Hogan
2024-12-05 21:04 ` [bug#73993] [PATCH v2 0/3] Pin git for git-sizer Greg Hogan
2024-12-05 21:04   ` [bug#73993] [PATCH v2 1/3] gnu: git-sizer: Propagate git Greg Hogan
2024-12-18 11:02     ` Ludovic Courtès
2024-12-05 21:04   ` [bug#73993] [PATCH v2 2/3] gnu: git-sizer: Use gexps Greg Hogan
2024-12-18 11:03     ` Ludovic Courtès
2024-12-05 21:04   ` [bug#73993] [PATCH v2 3/3] gnu: git-sizer: Pin git version Greg Hogan
2024-12-06 21:19     ` Liliana Marie Prikler
2024-12-09 15:30 ` [bug#73993] [PATCH v3] " Greg Hogan

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.