gnu: fio: Enable optional helper scripts.
* gnu/packages/benchmark.scm (fio)[arguments]: Add 'patch-paths' and 'wrap-python-scripts' phases. [inputs]: Add GNUPLOT, PYTHON-2, PYTHON2-NUMPY and PYTHON2-PANDAS.
This commit is contained in:
parent
5fa1683617
commit
ac6fec05e4
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
|
;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -22,7 +22,9 @@ (define-module (gnu packages benchmark)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (gnu packages compression)
|
#:use-module (gnu packages compression)
|
||||||
#:use-module (gnu packages linux))
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (gnu packages maths)
|
||||||
|
#:use-module (gnu packages python))
|
||||||
|
|
||||||
(define-public fio
|
(define-public fio
|
||||||
(package
|
(package
|
||||||
|
@ -41,16 +43,41 @@ (define-public fio
|
||||||
'(#:tests? #f ; No tests.
|
'(#:tests? #f ; No tests.
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
(add-after
|
||||||
|
'unpack 'patch-paths
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(let ((out (assoc-ref outputs "out"))
|
||||||
|
(gnuplot (string-append (assoc-ref inputs "gnuplot")
|
||||||
|
"/bin/gnuplot")))
|
||||||
|
(substitute* "tools/plot/fio2gnuplot"
|
||||||
|
(("/usr/share/fio") (string-append out "/share/fio"))
|
||||||
|
;; FIXME (upstream): The 'gnuplot' executable is used inline
|
||||||
|
;; in various os.system() calls mixed with *.gnuplot filenames.
|
||||||
|
(("; do gnuplot") (string-append "; do " gnuplot))
|
||||||
|
(("gnuplot mymath") (string-append gnuplot " mymath"))
|
||||||
|
(("gnuplot mygraph") (string-append gnuplot " mygraph")))
|
||||||
|
#t)))
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
;; The configure script doesn't understand some of the
|
;; The configure script doesn't understand some of the
|
||||||
;; GNU options, so we can't use #:configure-flags.
|
;; GNU options, so we can't use #:configure-flags.
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(zero? (system* "./configure"
|
(zero? (system* "./configure"
|
||||||
(string-append "--prefix=" out)))))))))
|
(string-append "--prefix=" out))))))
|
||||||
|
(add-after
|
||||||
|
'install 'wrap-python-scripts
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
(wrap-program (string-append out "/bin/fiologparser_hist.py")
|
||||||
|
`("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
|
||||||
|
#t))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("libaio" ,libaio)
|
`(("libaio" ,libaio)
|
||||||
("zlib" ,zlib)))
|
("gnuplot" ,gnuplot)
|
||||||
|
("zlib" ,zlib)
|
||||||
|
("python-numpy" ,python2-numpy)
|
||||||
|
("python-pandas" ,python2-pandas)
|
||||||
|
("python" ,python-2)))
|
||||||
(home-page "https://github.com/axboe/fio")
|
(home-page "https://github.com/axboe/fio")
|
||||||
(synopsis "Flexible I/O tester")
|
(synopsis "Flexible I/O tester")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Reference in a new issue