diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-03-28 00:08:36 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-03-28 15:51:28 +0200 |
commit | f125ec8ef2ae3648047f85ab9f8b554b5a13bbbc (patch) | |
tree | 42d9b08312269f9bfb11940d070c10464a642d86 | |
parent | 1a75083b0d532d9874ea073aa16a8c63d0fec685 (diff) | |
download | patches-f125ec8ef2ae3648047f85ab9f8b554b5a13bbbc.tar patches-f125ec8ef2ae3648047f85ab9f8b554b5a13bbbc.tar.gz |
gnu: fio: Install python scripts in separate output.
* gnu/packages/benchmark.scm (fio)[outputs]: New field.
[arguments]: Rename 'wrap-python-scripts' phase to 'move-outputs'. Keep wrapper.
-rw-r--r-- | gnu/packages/benchmark.scm | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index ff5715d578..9f6381eb40 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm @@ -64,13 +64,26 @@ (let ((out (assoc-ref outputs "out"))) (zero? (system* "./configure" (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)))))) + ;; The main `fio` executable is fairly small and self contained. + ;; Moving the auxiliary python and gnuplot scripts to a separate + ;; output saves almost 400 MiB on the closure. + (add-after 'install 'move-outputs + (lambda* (#:key outputs #:allow-other-keys) + (let ((oldbin (string-append (assoc-ref outputs "out") "/bin")) + (newbin (string-append (assoc-ref outputs "utils") "/bin"))) + (mkdir-p newbin) + (for-each (lambda (file) + (let ((src (string-append oldbin "/" file)) + (dst (string-append newbin "/" file))) + (link src dst) + (delete-file src))) + '("fio2gnuplot" "fio_latency2csv.py" + "fiologparser_hist.py" "fiologparser.py")) + ;; Make sure numpy et.al is found. + (wrap-program (string-append newbin "/fiologparser_hist.py") + `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))) + #t)))))) + (outputs '("out" "utils")) (inputs `(("libaio" ,libaio) ("gnuplot" ,gnuplot) |