gnu: fio: Use G-expressions.

* gnu/packages/benchmark.scm (fio)[arguments]:
Rewrite as G-expressions.
This commit is contained in:
Tobias Geerinckx-Rice 2022-05-01 02:00:00 +02:00
parent 140d4f2101
commit 3d84a72966
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -73,27 +73,28 @@ (define-public fio
"1qjivkisn7dxk8irrb0rglmmdpbnai6n7vindf18ln0j24cc1x56"))))
(build-system gnu-build-system)
(arguments
`(#:modules (,@%gnu-build-system-modules
(list #:modules
`(,@%gnu-build-system-modules
(ice-9 textual-ports))
#:test-target "test"
#:configure-flags '("--disable-native") ;don't generate code for the build CPU
#:configure-flags
#~(list "--disable-native") ;don't generate code for the build CPU
#:phases
(modify-phases %standard-phases
#~(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key (configure-flags ''()) outputs #:allow-other-keys)
(lambda* (#:key (configure-flags ''()) #:allow-other-keys)
;; The configure script doesn't understand some of the
;; GNU options, so we can't use the stock phase.
(let ((out (assoc-ref outputs "out")))
(apply invoke "./configure"
(string-append "--prefix=" out)
configure-flags))))
(string-append "--prefix=" #$output)
configure-flags)))
;; The main `fio` executable is fairly small and self contained.
;; Moving the auxiliary scripts to a separate output saves ~100 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"))
(lambda _
(let ((oldbin (string-append #$output "/bin"))
(newbin (string-append #$output:utils "/bin"))
(script? (lambda* (file #:rest _)
(call-with-input-file file
(lambda (port)