guix-commits
[Top][All Lists]
Advanced

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

36/163: gnu: cgit: Wrap with the new Guix PYTHONPATH.


From: guix-commits
Subject: 36/163: gnu: cgit: 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 55a87de696d6ff0ba711c425038215c5287c6a2e
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 22 22:40:54 2021 -0500

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

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 663a97f..aa71d11 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -859,7 +859,12 @@ collaboration using typical untrusted file hosts or 
services.")
                 "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:tests? #f ; XXX: fail to build the in-source git.
+     `(#: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 ; XXX: fail to build the in-source git.
        #:test-target "test"
        #:make-flags '("CC=gcc" "SHELL_PATH=sh")
        #:phases
@@ -893,9 +898,7 @@ collaboration using typical untrusted file hosts or 
services.")
                (("groff") (which "groff")))
 
              (substitute* "filters/html-converters/rst2html"
-               (("rst2html\\.py") (which "rst2html.py")))
-
-             #t))
+               (("rst2html\\.py") (which "rst2html.py")))))
          (delete 'configure) ; no configure script
          (add-after 'build 'build-man
            (lambda* (#:key make-flags #:allow-other-keys)
@@ -911,18 +914,17 @@ collaboration using typical untrusted file hosts or 
services.")
                ;; Move the platform-dependent 'cgit.cgi' into lib to get it
                ;; stripped.
                (rename-file (string-append out "/share/cgit/cgit.cgi")
-                            (string-append out "/lib/cgit/cgit.cgi"))
-               #t)))
+                            (string-append out "/lib/cgit/cgit.cgi")))))
          (add-after 'install 'wrap-python-scripts
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (for-each
               (lambda (file)
-                (wrap-program (string-append (assoc-ref outputs "out")
-                                             "/lib/cgit/filters/" file)
-                  `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
+                (let ((pythonpath (guix-pythonpath inputs)))
+                  (wrap-program (string-append (assoc-ref outputs "out")
+                                               "/lib/cgit/filters/" file)
+                    `(,pythonpath ":" prefix (,(getenv pythonpath))))))
               '("syntax-highlighting.py"
-                "html-converters/md2html"))
-             #t)))))
+                "html-converters/md2html")))))))
     (native-inputs
      ;; For building manpage.
      `(("asciidoc" ,asciidoc)



reply via email to

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