guix-commits
[Top][All Lists]
Advanced

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

73/163: gnu: itstool: Wrap with the new Guix PYTHONPATH.


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

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

commit f88596f305d764ea69f9988d2ce05cb511bcc2fb
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 20:55:21 2021 -0500

    gnu: itstool: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/glib.scm (itstool)[source]: Fix indentation.
    [arguments]: Import the (guix build python-build-system) module.
    [phases]{wrap-program}: Wrap with the new Guix PYTHONPATH.
    Delete trailing #t.
---
 gnu/packages/glib.scm | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index b6e4b88..c60f7ff 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020 Arthur Margerit <ruhtra.mar@gmail.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -534,27 +535,32 @@ The intltool collection can be used to do these things:
     (name "itstool")
     (version "2.0.6")
     (source (origin
-             (method url-fetch)
-             (uri (string-append "http://files.itstool.org/itstool/itstool-";
-                                 version ".tar.bz2"))
-             (sha256
-              (base32
-               "1acjgf8zlyk7qckdk19iqaca4jcmywd7vxjbcs1mm6kaf8icqcv2"))))
+              (method url-fetch)
+              (uri (string-append "http://files.itstool.org/itstool/itstool-";
+                                  version ".tar.bz2"))
+              (sha256
+               (base32
+                "1acjgf8zlyk7qckdk19iqaca4jcmywd7vxjbcs1mm6kaf8icqcv2"))))
     (build-system gnu-build-system)
     (inputs
      `(("libxml2" ,libxml2)
        ("python-libxml2" ,python-libxml2)
        ("python" ,python)))
     (arguments
-     '(#:phases
+     `(#: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))
+       #:phases
        (modify-phases %standard-phases
          (add-after 'install 'wrap-program
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((prog (string-append (assoc-ref outputs "out")
-                                        "/bin/itstool")))
+                                        "/bin/itstool"))
+                   (pythonpath (guix-pythonpath inputs)))
                (wrap-program prog
-                 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
-               #t))))))
+                 `(,pythonpath = (,(getenv pythonpath))))))))))
     (home-page "http://www.itstool.org";)
     (synopsis "Tool to translate XML documents with PO files")
     (description



reply via email to

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