guix-commits
[Top][All Lists]
Advanced

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

52/163: gnu: ibus: Wrap with the new Guix PYTHONPATH.


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

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

commit de462efb63a7e18d93b88c0e12e8e2a53559faa4
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 00:04:27 2021 -0500

    gnu: ibus: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/ibus.scm (ibus): Delete trailing #t.
    [phases]{wrap-with-additional-paths}: Use the new Guix PYTHONPATH.
---
 gnu/packages/ibus.scm | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 9e13f86..b9e8c3a 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2018, 2019, 2020 Peng Mei Yu <i@pengmeiyu.com>
 ;;; Copyright © 2020 kanichos <kanichos@yandex.ru>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,7 +72,12 @@
                 "0jmy2w01phpmqnjnfnak7nvfna57mpgfnl87jwc4iai8ijjynw41"))))
     (build-system glib-or-gtk-build-system)
     (arguments
-     `(#:tests? #f  ; tests fail because there's no connection to dbus
+     `(#:imported-modules ,(cons '(guix build python-build-system)
+                                 %glib-or-gtk-build-system-modules)
+       #:modules ((guix build glib-or-gtk-build-system)
+                  ((guix build python-build-system) #:select (guix-pythonpath))
+                  (guix build utils))
+       #:tests? #f  ; tests fail because there's no connection to dbus
        #:parallel-build? #f ; race condition discovered with emoji support
        #:configure-flags (list "--enable-python-library"
                                (string-append
@@ -98,13 +104,11 @@
                  (("(py2?overridesdir)=.*" _ var)
                   (string-append var "=" root "/gi/overrides/"))
                  (("(pkgpython2dir=).*" _ var)
-                  (string-append var root "/ibus"))))
-             #t))
+                  (string-append var root "/ibus"))))))
          (add-before 'configure 'disable-dconf-update
            (lambda _
              (substitute* "data/dconf/Makefile.in"
-               (("dconf update") "echo dconf update"))
-             #t))
+               (("dconf update") "echo dconf update"))))
          (add-after 'unpack 'delete-generated-files
            (lambda _
              (for-each (lambda (file)
@@ -112,8 +116,7 @@
                            (when (file-exists? c)
                              (format #t "deleting ~a\n" c)
                              (delete-file c))))
-                       (find-files "." "\\.vala"))
-             #t))
+                       (find-files "." "\\.vala"))))
          (add-after 'unpack 'fix-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "src/ibusenginesimple.c"
@@ -122,19 +125,18 @@
                                "/share/X11/locale")))
              (substitute* "ui/gtk3/xkblayout.vala"
                (("\"(setxkbmap|xmodmap)\"" _ prog)
-                (string-append "\"" (assoc-ref inputs prog) "/bin/" prog 
"\"")))
-             #t))
+                (string-append "\"" (assoc-ref inputs prog) "/bin/" prog 
"\"")))))
          (add-after 'wrap-program 'wrap-with-additional-paths
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; Make sure 'ibus-setup' runs with the correct PYTHONPATH and
              ;; GI_TYPELIB_PATH.
-             (let ((out (assoc-ref outputs "out")))
+             (let ((out (assoc-ref outputs "out"))
+                   (pythonpath (guix-pythonpath inputs)))
                (wrap-program (string-append out "/bin/ibus-setup")
-                 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+                 `(,pythonpath ":" prefix (,(getenv pythonpath)))
                  `("GI_TYPELIB_PATH" ":" prefix
                    (,(getenv "GI_TYPELIB_PATH")
-                    ,(string-append out "/lib/girepository-1.0")))))
-             #t)))))
+                    ,(string-append out "/lib/girepository-1.0"))))))))))
     (inputs
      `(("dbus" ,dbus)
        ("dconf" ,dconf)



reply via email to

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