guix-commits
[Top][All Lists]
Advanced

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

09/163: gnu: dstat: Adjust wrap phase.


From: guix-commits
Subject: 09/163: gnu: dstat: Adjust wrap phase.
Date: Mon, 25 Jan 2021 02:01:15 -0500 (EST)

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

commit efb1f131684b1ef4b49d15f2cab9e9d1a366f49c
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 22 10:25:50 2021 -0500

    gnu: dstat: Adjust wrap phase.
    
    * gnu/packages/admin.scm (dstat): Import required modules and adjust the 
wrap
    phase to use guix-pythonpath instead of PYTHONPATH.
---
 gnu/packages/admin.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index afcf632..1b1b78c 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -2733,7 +2733,11 @@ results (ndiff), and a packet generation and response 
analysis tool (nping).")
                                 "dstat-skip-devices-without-io.patch"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:tests? #f                      ; no make check
+     `(#:imported-modules ,%python-build-system-modules
+       #:modules ((guix build gnu-build-system)
+                  ((guix build python-build-system) #:select (guix-pythonpath))
+                  (guix build utils))
+       #:tests? #f                      ; no make check
        #:make-flags
        (list (string-append "prefix=" (assoc-ref %outputs "out")))
        #:phases
@@ -2745,11 +2749,11 @@ results (ndiff), and a packet generation and response 
analysis tool (nping).")
              #t))
          (delete 'configure)            ; no configure script
          (add-after 'install 'wrap
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (pythonpath (guix-pythonpath inputs)))
                (wrap-program (string-append out "/bin/dstat")
-                 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
-               #t))))))
+                 `(,pythonpath ":" prefix (,(getenv pythonpath))))))))))
     (inputs
      `(("python" ,python-wrapper)
        ("python-six" ,python-six)))



reply via email to

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