guix-commits
[Top][All Lists]
Advanced

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

50/163: gnu: econnman: Wrap with the new Guix PYTHONPATH.


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

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

commit a8b447dff210a4d00ebaf39645061149336982a9
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 22 23:52:17 2021 -0500

    gnu: econnman: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/connman.scm (econnman): Delete trailing #t.  Import the (guix
    build python-build-system) module.
    [phases]{wrap-binary}: Use the new Guix PYTHONPATH.
---
 gnu/packages/connman.scm | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/connman.scm b/gnu/packages/connman.scm
index 5f17a0e..63f8e78 100644
--- a/gnu/packages/connman.scm
+++ b/gnu/packages/connman.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -111,18 +112,23 @@ sharing) to clients via USB, ethernet, WiFi, cellular and 
Bluetooth.")
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--localstatedir=/var")
+       #: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 'unpack 'set-home-directory
            ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2
-           (lambda _ (setenv "HOME" "/tmp") #t))
+           (lambda _ (setenv "HOME" "/tmp")))
          (add-after 'install 'wrap-binary
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin/econnman-bin")))
+                    (bin (string-append out "/bin/econnman-bin"))
+                    (pythonpath (guix-pythonpath inputs)))
                (wrap-program bin
-                 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
-               #t))))))
+                 `(,pythonpath ":" prefix (,(getenv pythonpath))))))))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs
      `(("efl" ,efl)



reply via email to

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