guix-commits
[Top][All Lists]
Advanced

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

93/163: gnu: byobu: Wrap with the new Guix PYTHONPATH.


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

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

commit 905abbe7f2d33a95dd9659b2d1cdc5d4329ed2f0
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 23:08:00 2021 -0500

    gnu: byobu: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/screen.scm (byobu)[phases]: Remove trailing #t.
    {wrap-python-scripts}: Wrap with the new Guix PYTHONPATH.
---
 gnu/packages/screen.scm | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index 0491731..92076c7 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; 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.
 ;;;
@@ -119,29 +120,33 @@ controlling terminal and attach to it later.")
      `(("python" ,python-wrapper)       ; for config and session GUIs
        ("python-newt" ,newt "python")))
     (arguments
-     `(#:phases
+     `(#: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-before
           'configure 'provide-locale
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((libc (assoc-ref inputs "libc"))) ; implicit input
               (substitute* "usr/bin/byobu.in"
-                (("locale") (string-append libc "/bin/locale")))
-              #t)))
+                (("locale") (string-append libc "/bin/locale"))))))
          (add-after
           'install 'wrap-python-scripts
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let* ((python (string-append (assoc-ref inputs "python")
                                           "/bin/python"))
+                   (pythonpath (guix-pythonpath inputs))
                    (out    (assoc-ref outputs "out"))
                    (config (string-append out "/bin/byobu-config"))
                    (select (string-append out "/bin/byobu-select-session")))
               (wrap-program config
                 `("BYOBU_PYTHON" = (,python))
-                `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+                `(,python ":" prefix (,(getenv python))))
               (wrap-program select
-                `("BYOBU_PYTHON" = (,python)))
-              #t))))))
+                `("BYOBU_PYTHON" = (,python)))))))))
     (home-page "https://byobu.org/";)
     (synopsis "Text-based window manager and terminal multiplexer")
     (description



reply via email to

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