guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

38/163: gnu: git-imerge: Wrap with the new Guix PYTHONPATH.


From: guix-commits
Subject: 38/163: gnu: git-imerge: Wrap with the new Guix PYTHONPATH.
Date: Mon, 25 Jan 2021 02:01:24 -0500 (EST)

apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.

commit d2f0f8b476af2ffbb97df65ae90088ff62a1fefd
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 22 22:49:18 2021 -0500

    gnu: git-imerge: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/version-control.scm (git-imerge)
    [phases]: Delete trailing #t.
    {wrap-scripts}: Wrap with the new Guix PYTHONPATH.
---
 gnu/packages/version-control.scm | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 1cd3d5e..fdf6fa4 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2632,7 +2632,12 @@ how information about the merge is displayed.")
         (base32 "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:tests? #f                      ; only manual test scripts
+     `(#:imported-modules ,(cons '(guix build python-build-system)
+                                 %gnu-build-system-modules)
+       #:modules ((guix build gnu-build-system)
+                  ((guix build python-build-system) #:select (guix-pythonpath))
+                  (guix build utils))
+       #:tests? #f                      ; only manual test scripts
        #:make-flags (list (string-append "DESTDIR=" %output)
                           "PREFIX=")
        #:phases
@@ -2643,14 +2648,13 @@ how information about the merge is displayed.")
              (let ((git (string-append (assoc-ref inputs "git")
                                        "/bin/git")))
                (substitute* "git-imerge"
-                 (("'git'") (string-append "'" git "'")))
-               #t)))
+                 (("'git'") (string-append "'" git "'"))))))
          (add-after 'install 'wrap-script
-           (lambda* (#:key outputs #:allow-other-keys)
-             (wrap-program (string-append (assoc-ref outputs "out")
-                                          "/bin/git-imerge")
-               `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
-             #t)))))
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((pythonpath (guix-pythonpath inputs)))
+               (wrap-program (string-append (assoc-ref outputs "out")
+                                            "/bin/git-imerge")
+                 `(,pythonpath ":" prefix (,(getenv pythonpath))))))))))
     (inputs
      `(("git" ,git)
        ("python" ,python-wrapper)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]