Subject: [bug#72813] [PATCH v2] gnu: packages: Fix git system configuration.

From: Lilah Tascheter <[email-masked]>
Date: Wed, 22 Jan 2025 16:40:03 -0600

* gnu/packages/version-control.scm (git-minimal)[arguments]<configure-flags>:
  Add configure flag to properly recognize the system gitconfig.
  (git-minimal/pinned)[arguments]: Use old arguments as to not force rebuild.

Change-Id: I7f31d16aa6c7ab062f300019f1f862b561ece2d3
---
 gnu/packages/version-control.scm | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 2a95bc79e1..f5942e8138 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -283,9 +283,8 @@ (define-public git-minimal
       #:disallowed-references (list bash perl)
       #:test-target "test"
       #:configure-flags
-      (if (%current-target-system)
-          git-cross-configure-flags
-          #~(list))
+      #~(cons "--with-gitconfig=/etc/gitconfig"
+          #$(if (%current-target-system) git-cross-configure-flags #~(list)))
       #:make-flags
       #~(list "V=1"                     ;more verbose compilation
               (string-append "SHELL_PATH="
@@ -772,7 +771,13 @@ (define-public git-minimal/pinned
                                   version ".tar.xz"))
               (sha256
                (base32
-                "0h40arw08xbpi2cbf7pvc947v963rjxz3inb2ar81zjc8byvlj77"))))))
+                "0h40arw08xbpi2cbf7pvc947v963rjxz3inb2ar81zjc8byvlj77"))))
+    ;; Temporary measure to prevent unneccessary package rebuilds.
+    (arguments (substitute-keyword-arguments (package-arguments git-minimal)
+                 ((#:configure-flags flags #~'())
+                  (if (%current-target-system)
+                    git-cross-configure-flags
+                    #~(list)))))))
 
 (define-public python-klaus
   (package

base-commit: 30327e379b2acdcdc418109e1f01ab92210a83cd
-- 
2.47.1