guix-commits
[Top][All Lists]
Advanced

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

98/163: gnu: blueman: Wrap with the new Guix PYTHONPATH.


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

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

commit fcd21c68885e5c422072781da37dcfc65090ec1e
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 23:33:11 2021 -0500

    gnu: blueman: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/networking.scm (blueman)[phases]: Remove trailing #t.
    {wrap-blueman-progs}: Wrap with the new Guix PYTHONPATH.
---
 gnu/packages/networking.scm | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index fad917a..8d00a56 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -26,7 +26,7 @@
 ;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018, 2020 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
-;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2019 Vasile Dumitrascu <va511e@yahoo.com>
 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
@@ -561,7 +561,12 @@ systems with no further dependencies.")
         (base32 "1nk46s1s8yrlqv37sc7la05nnn7sdgqhkrcdm98qin34llwkv70x"))))
     (build-system glib-or-gtk-build-system)
     (arguments
-     `(#:configure-flags (list "--enable-polkit"
+     `(#: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))
+       #:configure-flags (list "--enable-polkit"
                                "--without-systemdsystemunitdir" ; Not required
                                "--without-systemduserunitdir")  ; Not required
        #:phases
@@ -579,8 +584,7 @@ systems with no further dependencies.")
                  (("@PYTHON@") (string-append (assoc-ref inputs "python")
                                               "/bin/python"
                                               ,(version-major+minor
-                                                (package-version python))))))
-             #t))
+                                                (package-version python))))))))
          ;; Fix loading of external programs.
          (add-after 'unpack 'patch-external-programs
            (lambda* (#:key inputs #:allow-other-keys)
@@ -594,8 +598,7 @@ systems with no further dependencies.")
                                "/sbin/iptables"))
                (("/usr/sbin/pppd")
                 (string-append (assoc-ref inputs "ppp")
-                               "/sbin/pppd")))
-             #t))
+                               "/sbin/pppd")))))
          ;; Fix loading of pulseaudio libraries.
          (add-after 'unpack 'patch-pulseaudio-libraries
            (lambda* (#:key inputs #:allow-other-keys)
@@ -606,30 +609,26 @@ systems with no further dependencies.")
                (with-directory-excursion "blueman/main"
                  (substitute* "PulseAudioUtils.py"
                    (("libpulse.so.0") pulse)
-                   (("libpulse-mainloop-glib.so.0") pulse-glib)))
-               #t)))
+                   (("libpulse-mainloop-glib.so.0") pulse-glib))))))
          ;; Fix running of blueman programs.
          (add-after 'glib-or-gtk-wrap 'wrap-blueman-progs
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (bin (string-append out "/bin/blueman-"))
                     (libexec (string-append out "/libexec/blueman-"))
-                    (lib (string-append out "/lib/python"
-                                        ,(version-major+minor
-                                          (package-version python))
-                                        "/site-packages")))
+                    (pythonpath (guix-pythonpath inputs))
+                    (site (site-packages inputs outputs)))
                (for-each
                 (lambda (program)
                   (wrap-program program
-                    `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,lib))
+                    `(,pythonpath = (,(getenv ,pythonpath) ,site))
                     `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))
                 (append
                  (map (lambda (prog) (string-append bin prog))
                       '("adapters" "applet" "assistant" "manager" "report"
                         "sendto" "services" "tray"))
                  (map (lambda (prog) (string-append libexec prog))
-                      '("mechanism" "rfcomm-watcher"))))
-               #t))))))
+                      '("mechanism" "rfcomm-watcher"))))))))))
     (native-inputs
      `(("cython" ,python-cython)
        ("glib:bin" ,glib "bin")
@@ -3563,7 +3562,7 @@ module @code{batman-adv}, for Layer 2.")
              (let* ((out (assoc-ref outputs "out"))
                     (man (string-append out "/share/man")))
                (invoke "make"
-                       (string-append "PYTHONPATH=" (getenv "PYTHONPATH"))
+                       (string-append "PYTHONPATH=" (or (getenv "PYTHONPATH") 
""))
                        "doc/pagekite.1")
                (install-file "doc/pagekite.1" (string-append man "/man1"))
                #t))))))



reply via email to

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