guix-commits
[Top][All Lists]
Advanced

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

64/163: gnu: cozy: Wrap with the new Guix PYTHONPATH.


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

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

commit cdb511304f86dc48f494fcb71c442765fcf62029
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 00:41:42 2021 -0500

    gnu: cozy: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/ebook.scm (cozy): Delete trailing #t.
    [phases]{wrap-libs}: Wrap with the new Guix PYTHONPATH.
---
 gnu/packages/ebook.scm | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index 47bbd1a..4554e9d 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -455,20 +456,23 @@ following formats:
         (base32 "0z2wj9g32aa5g9pw81q49iv1smb6yvlv9zs0vrzbx6mw8cj3c5d2"))))
     (build-system meson-build-system)
     (arguments
-     `(#:glib-or-gtk? #t
+     `(#:imported-modules ,(cons '(guix build python-build-system)
+                                 %meson-build-system-modules)
+       #:modules ((guix build meson-build-system)
+                  ((guix build python-build-system) #:select (guix-pythonpath))
+                  (guix build utils))
+       #:glib-or-gtk? #t
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-desktop-file
            (lambda _
              (substitute* "data/com.github.geigi.cozy.desktop"
-               (("Exec=com.github.geigi.cozy") "Exec=cozy"))
-             #t))
+               (("Exec=com.github.geigi.cozy") "Exec=cozy"))))
          (add-after 'install 'patch-executable-name
            (lambda* (#:key outputs #:allow-other-keys)
              (with-directory-excursion
                  (string-append (assoc-ref outputs "out") "/bin")
-               (rename-file "com.github.geigi.cozy" "cozy"))
-             #t))
+               (rename-file "com.github.geigi.cozy" "cozy"))))
          (add-after 'wrap 'wrap-libs
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out               (assoc-ref outputs "out"))
@@ -482,13 +486,12 @@ following formats:
                     (libmagic-path     (string-append
                                         (assoc-ref %build-inputs "file")
                                         "/lib"))
-                    (python-path     (getenv "PYTHONPATH")))
+                    (pythonpath        (guix-pythonpath inputs)))
                (wrap-program (string-append out "/bin/cozy")
                  `("LD_LIBRARY_PATH" ":" prefix (,libmagic-path))
                  `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
                  `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
-                 `("PYTHONPATH" ":" prefix (,python-path ,pylib))))
-             #t)))))
+                 `(,pythonpath ":" prefix (,(getenv pythonpath) ,pylib)))))))))
     (native-inputs
      `(("desktop-file-utils" ,desktop-file-utils)
        ("gettext" ,gettext-minimal)



reply via email to

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