Subject: [bug#74892] [PATCH 1/9] gnu: python-gitpython: Rewrite to use gexps.

From: Ludovic Courtès <[email-masked]>
Date: Sun, 15 Dec 2024 19:16:21 +0100

* gnu/packages/version-control.scm (python-gitpython)[arguments]: Change
to gexps; use ‘search-input-file’.

Change-Id: I4fb2ce74262a05aaf32644dd3b8bfb674747fdbe
---
 gnu/packages/version-control.scm | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 497d31cf73..3794d20082 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Nikita Karetnikov <[email-masked]>
 ;;; Copyright © 2013 Cyril Roelandt <[email-masked]>
-;;; Copyright © 2013-2022 Ludovic Courtès <[email-masked]>
+;;; Copyright © 2013-2022, 2024 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2013, 2014 Andreas Enge <[email-masked]>
 ;;; Copyright © 2015, 2016 Mathieu Lirzin <[email-masked]>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <[email-masked]>
@@ -1645,15 +1645,16 @@ (define-public python-gitpython
                 "1rarp97cpjnhi106k2yhb7kygdyflmlgq0icxv3ggzl4wvszv0yz"))))
     (build-system python-build-system)
     (arguments
-     `(#:tests? #f ;XXX: Tests can only be run within the GitPython repository.
-       #:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'embed-git-reference
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (substitute* "git/cmd.py"
-                        (("git_exec_name = \"git\"")
-                         (string-append "git_exec_name = \""
-                                        (assoc-ref inputs "git")
-                                        "/bin/git\""))))))))
+     (list #:tests? #f ;XXX: tests can only be run within the GitPython repository
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'embed-git-reference
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (substitute* "git/cmd.py"
+                     (("git_exec_name = \"git\"")
+                      (string-append "git_exec_name = \""
+                                     (search-input-file inputs "/bin/git")
+                                     "\""))))))))
     (inputs
      (list git))
     (propagated-inputs
-- 
2.46.0