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.
This commit is contained in:
parent
1a75083b0d
commit
f125ec8ef2
|
@ -64,13 +64,26 @@
|
||||||
(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
|
;; The main `fio` executable is fairly small and self contained.
|
||||||
'install 'wrap-python-scripts
|
;; Moving the auxiliary python and gnuplot scripts to a separate
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
;; output saves almost 400 MiB on the closure.
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(add-after 'install 'move-outputs
|
||||||
(wrap-program (string-append out "/bin/fiologparser_hist.py")
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
`("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
|
(let ((oldbin (string-append (assoc-ref outputs "out") "/bin"))
|
||||||
#t))))))
|
(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
|
(inputs
|
||||||
`(("libaio" ,libaio)
|
`(("libaio" ,libaio)
|
||||||
("gnuplot" ,gnuplot)
|
("gnuplot" ,gnuplot)
|
||||||
|
|
Loading…
Reference in New Issue