gnu: dstat: Add bash-minimal to inputs and use gexps.

* gnu/packages/admin.scm (dstat) [inputs]: Add bash-minimal.
[arguments]: Use gexps.  Delete trailing #t.

Change-Id: Ia0635f39dfbc09be96690be678d1ad22983b6c08
This commit is contained in:
Maxim Cournoyer 2023-10-19 23:21:11 -04:00 committed by Ludovic Courtès
parent bfce628617
commit 016b4fc307
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -3494,26 +3494,26 @@ results (ndiff), and a packet generation and response analysis tool (nping).")
"dstat-skip-devices-without-io.patch")))) "dstat-skip-devices-without-io.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:tests? #f ; no make check (list
#:tests? #f ; no make check
#:make-flags #:make-flags
(list (string-append "prefix=" (assoc-ref %outputs "out"))) #~(list (string-append "prefix=" #$output))
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'fix-python3-DeprecationWarning (add-after 'unpack 'fix-python3-DeprecationWarning
(lambda _ (lambda _
(substitute* "dstat" (substitute* "dstat"
(("collections") "collections.abc")) (("collections") "collections.abc"))))
#t))
(delete 'configure) ; no configure script (delete 'configure) ; no configure script
(add-after 'install 'wrap (add-after 'install 'wrap
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let ((out (assoc-ref outputs "out"))) (wrap-program (string-append #$output "/bin/dstat")
(wrap-program (string-append out "/bin/dstat") `("GUIX_PYTHONPATH" ":" prefix
`("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))) (,(getenv "GUIX_PYTHONPATH")))))))))
#t))))))
(inputs (inputs
`(("python" ,python-wrapper) (list bash-minimal ;for wrap-program
("python-six" ,python-six))) python-wrapper
python-six))
(synopsis "Versatile resource statistics tool") (synopsis "Versatile resource statistics tool")
(description "Dstat is a versatile replacement for @command{vmstat}, (description "Dstat is a versatile replacement for @command{vmstat},
@command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes @command{iostat}, @command{netstat}, and @command{ifstat}. Dstat overcomes