gnu: dstat: Add python2-six.

* gnu/packages/admin.scm (dstat)[inputs]: Add python2-six.
[arguments]: Add ‘wrap’ phase to make dstat find required modules.
master
Tobias Geerinckx-Rice 2019-06-13 02:17:48 +02:00
parent 76533c52c0
commit 5cc5364eba
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 14 additions and 3 deletions

View File

@ -2140,9 +2140,20 @@ results (ndiff), and a packet generation and response analysis tool (nping).")
#:make-flags (let ((out (assoc-ref %outputs "out")))
(list (string-append "DESTDIR=" out)
"prefix=/"))
;; No configure script.
#:phases (modify-phases %standard-phases (delete 'configure))))
(inputs `(("python-2" ,python-2)))
#:phases
(modify-phases %standard-phases
(delete 'configure) ; no configure script
(add-after 'install 'wrap
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/dstat")
`("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
#t))))))
(inputs
;; Python 3 is supposedly supported but prints a DeprecationWarning.
;; Upstream is dead. See <https://github.com/dagwieers/dstat/releases>.
`(("python" ,python-wrapper)
("python-six" ,python-six)))
(synopsis "Versatile resource statistics tool")
(description "Dstat is a versatile replacement for @command{vmstat},
@command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes