guix-commits
[Top][All Lists]
Advanced

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

37/163: gnu: git-when-merged: Wrap with the new Guix PYTHONPATH.


From: guix-commits
Subject: 37/163: gnu: git-when-merged: 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 9787caa55e7c5e27914377935453b30bac311098
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 22 22:45:27 2021 -0500

    gnu: git-when-merged: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/version-control.scm (git-when-merged)
    [phases]: Delete trailing #t.
    {wrap-python-scripts}: Wrap with the new Guix PYTHONPATH.
---
 gnu/packages/version-control.scm | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index aa71d11..1cd3d5e 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2579,7 +2579,12 @@ directory full of HOWTOs.")
                   "0iyk2psf97bc9h43m89p3xjmm79fsx99i7px29g4lcnmdy5kmz0p"))))
       (build-system gnu-build-system)
       (arguments
-       `(#:tests? #f                    ; there are no tests
+       `(#: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                    ; there are no tests
          #:phases
          (modify-phases %standard-phases
            (delete 'configure)
@@ -2588,21 +2593,19 @@ directory full of HOWTOs.")
              (lambda* (#:key outputs #:allow-other-keys)
                (install-file "bin/git-when-merged"
                              (string-append (assoc-ref outputs "out")
-                                            "/bin"))
-               #t))
+                                            "/bin"))))
            (add-before 'install 'patch-git
              (lambda* (#:key inputs #:allow-other-keys)
                (let ((git (string-append (assoc-ref inputs "git")
                                          "/bin/git")))
                  (substitute* "bin/git-when-merged"
-                   (("'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-when-merged")
-                 `("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-when-merged")
+                   `(,pythonpath ":" prefix (,(getenv pythonpath))))))))))
       (inputs
        `(("git" ,git)
          ("python" ,python-wrapper)))



reply via email to

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