summaryrefslogtreecommitdiff
path: root/gnu/packages/benchmark.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-11-05 23:56:36 +0100
committerMarius Bakke <marius@gnu.org>2021-11-06 17:46:37 +0100
commit5e7c2eb7ae95064cb0c68e2ca6a9256a3b9f0b0d (patch)
treed9eb99eea442a74c8910c69415b0db1c6f4a464c /gnu/packages/benchmark.scm
parent567c4f4495fd1681bc6bd1ca3e9d1a87e120ac61 (diff)
gnu: fio: Don't bother wrapping scripts.
fio comes with many scripts of varying utility. Some require extra additional programs, which users can easily install as needed; there is little use in imposing all optional dependencies on all users of fio. * gnu/packages/benchmark.scm (fio)[arguments]: Remove patch-paths phase. Rewrite move-outputs to move all discovered scripts and not wrap any. [inputs]: Remove GNUPLOT, PYTHON-2, PYTHON2-NUMPY, and PYTHON2-PANDAS. Add PYTHON.
Diffstat (limited to 'gnu/packages/benchmark.scm')
-rw-r--r--gnu/packages/benchmark.scm48
1 files changed, 16 insertions, 32 deletions
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index a4220738056..3cee5dae179 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -1,5 +1,5 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com> 2;;; Copyright © 2016, 2017, 2021 Marius Bakke <marius@gnu.org>
3;;; Copyright © 2017 Dave Love <fx@gnu.org> 3;;; Copyright © 2017 Dave Love <fx@gnu.org>
4;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr> 4;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
5;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> 5;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
@@ -63,22 +63,11 @@
63 "0ba9cnjrnm3nwcfbhh5x2sycr54j3yn1rqn76kjdyz40f3pdg3qm")))) 63 "0ba9cnjrnm3nwcfbhh5x2sycr54j3yn1rqn76kjdyz40f3pdg3qm"))))
64 (build-system gnu-build-system) 64 (build-system gnu-build-system)
65 (arguments 65 (arguments
66 '(#:test-target "test" 66 `(#:modules (,@%gnu-build-system-modules
67 (ice-9 textual-ports))
68 #:test-target "test"
67 #:phases 69 #:phases
68 (modify-phases %standard-phases 70 (modify-phases %standard-phases
69 (add-after
70 'unpack 'patch-paths
71 (lambda* (#:key inputs outputs #:allow-other-keys)
72 (let ((out (assoc-ref outputs "out"))
73 (gnuplot (string-append (assoc-ref inputs "gnuplot")
74 "/bin/gnuplot")))
75 (substitute* "tools/plot/fio2gnuplot"
76 (("/usr/share/fio") (string-append out "/share/fio"))
77 ;; FIXME (upstream): The 'gnuplot' executable is used inline
78 ;; in various os.system() calls mixed with *.gnuplot filenames.
79 (("; do gnuplot") (string-append "; do " gnuplot))
80 (("gnuplot mymath") (string-append gnuplot " mymath"))
81 (("gnuplot mygraph") (string-append gnuplot " mygraph"))))))
82 (replace 'configure 71 (replace 'configure
83 (lambda* (#:key outputs #:allow-other-keys) 72 (lambda* (#:key outputs #:allow-other-keys)
84 ;; The configure script doesn't understand some of the 73 ;; The configure script doesn't understand some of the
@@ -87,32 +76,27 @@
87 (invoke "./configure" 76 (invoke "./configure"
88 (string-append "--prefix=" out))))) 77 (string-append "--prefix=" out)))))
89 ;; The main `fio` executable is fairly small and self contained. 78 ;; The main `fio` executable is fairly small and self contained.
90 ;; Moving the auxiliary python and gnuplot scripts to a separate 79 ;; Moving the auxiliary scripts to a separate output saves ~100 MiB
91 ;; output saves almost 400 MiB on the closure. 80 ;; on the closure.
92 (add-after 'install 'move-outputs 81 (add-after 'install 'move-outputs
93 (lambda* (#:key outputs #:allow-other-keys) 82 (lambda* (#:key outputs #:allow-other-keys)
94 (let ((oldbin (string-append (assoc-ref outputs "out") "/bin")) 83 (let ((oldbin (string-append (assoc-ref outputs "out") "/bin"))
95 (newbin (string-append (assoc-ref outputs "utils") "/bin"))) 84 (newbin (string-append (assoc-ref outputs "utils") "/bin"))
85 (script? (lambda* (file #:rest _)
86 (call-with-input-file file
87 (lambda (port)
88 (char=? #\# (peek-char port)))))))
96 (mkdir-p newbin) 89 (mkdir-p newbin)
97 (for-each (lambda (file) 90 (for-each (lambda (file)
98 (let ((src (string-append oldbin "/" file)) 91 (link file (string-append newbin "/" (basename file)))
99 (dst (string-append newbin "/" file))) 92 (delete-file file))
100 (link src dst) 93 (find-files oldbin script?))))))))
101 (delete-file src)))
102 '("fio2gnuplot" "fiologparser_hist.py"
103 "fiologparser.py"))
104 ;; Make sure numpy et.al is found.
105 (wrap-program (string-append newbin "/fiologparser_hist.py")
106 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))))))))
107 (outputs '("out" "utils")) 94 (outputs '("out" "utils"))
108 (inputs 95 (inputs
109 `(("ceph" ,ceph "lib") 96 `(("ceph" ,ceph "lib")
110 ("libaio" ,libaio) 97 ("libaio" ,libaio)
111 ("gnuplot" ,gnuplot) 98 ("python" ,python)
112 ("zlib" ,zlib) 99 ("zlib" ,zlib)))
113 ("python-numpy" ,python2-numpy)
114 ("python-pandas" ,python2-pandas)
115 ("python" ,python-2)))
116 (home-page "https://github.com/axboe/fio") 100 (home-page "https://github.com/axboe/fio")
117 (synopsis "Flexible I/O tester") 101 (synopsis "Flexible I/O tester")
118 (description 102 (description