guix-commits
[Top][All Lists]
Advanced

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

24/163: gnu: cdemu-client: Wrap with the new Guix PYTHONPATH.


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

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

commit 6e405a196805fca175dd472a6674f4a69ab01ee7
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 22 16:42:54 2021 -0500

    gnu: cdemu-client: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/cdrom.scm (cdemu-client): Delete trailing #t.
    [phases]{wrap-program}: Wrap with the new Guix PYTHONPATH.
---
 gnu/packages/cdrom.scm | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm
index a8da7ba..e778465 100644
--- a/gnu/packages/cdrom.scm
+++ b/gnu/packages/cdrom.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,6 +39,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system python)
   #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (gnu packages)
@@ -1025,22 +1027,25 @@ drive and disc (including CD-ROMs and DVD-ROMs).")
        ("python-pygobject" ,python-pygobject)
        ("cdemu-daemon" ,cdemu-daemon)))
     (arguments
-     ;; No tests.
-     `(#:tests? #f
+     `(#:imported-modules ,(cons '(guix build python-build-system)
+                                 %cmake-build-system-modules)
+       #:modules ((guix build cmake-build-system)
+                  ((guix build python-build-system) #:select (guix-pythonpath))
+                  (guix build utils))
+       #:tests? #f                      ;no tests
        #:phases
        (modify-phases %standard-phases
          (add-after 'install 'patch-shebang
            (lambda* (#:key outputs #:allow-other-keys)
              (patch-shebang (string-append (assoc-ref outputs "out")
-                                           "/bin/cdemu"))
-             #t))
+                                           "/bin/cdemu"))))
          (add-after 'patch-shebang 'wrap-program
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((prog (string-append (assoc-ref outputs "out")
-                                        "/bin/cdemu")))
+                                        "/bin/cdemu"))
+                   (pythonpath (guix-pythonpath inputs)))
                (wrap-program prog
-                 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
-               #t))))))
+                 `(,pythonpath = (,(getenv pythonpath))))))))))
     (home-page "https://cdemu.sourceforge.io/";)
     (synopsis "Command-line client for controlling cdemu-daemon")
     (description "CDEmu client is a simple command-line client for controlling



reply via email to

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