summaryrefslogtreecommitdiff
path: root/gnu/packages/benchmark.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2022-05-01 02:00:00 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2022-05-01 02:00:08 +0200
commit3d84a7296640774d723d66a2284956f3d05fb84c (patch)
treeb19679d71eb99ecf461e78048ce66a97bf39573e /gnu/packages/benchmark.scm
parent140d4f2101ebdca37263f40ef0af854ea2fbee3b (diff)
gnu: fio: Use G-expressions.
* gnu/packages/benchmark.scm (fio)[arguments]: Rewrite as G-expressions.
Diffstat (limited to 'gnu/packages/benchmark.scm')
-rw-r--r--gnu/packages/benchmark.scm61
1 files changed, 31 insertions, 30 deletions
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index 97b4fd43f2..25cdfe1dd2 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -73,36 +73,37 @@
"1qjivkisn7dxk8irrb0rglmmdpbnai6n7vindf18ln0j24cc1x56"))))
(build-system gnu-build-system)
(arguments
- `(#:modules (,@%gnu-build-system-modules
- (ice-9 textual-ports))
- #:test-target "test"
- #:configure-flags '("--disable-native") ;don't generate code for the build CPU
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key (configure-flags ''()) outputs #: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))))
- ;; 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"))
- (script? (lambda* (file #:rest _)
- (call-with-input-file file
- (lambda (port)
- (char=? #\# (peek-char port)))))))
- (mkdir-p newbin)
- (for-each (lambda (file)
- (link file (string-append newbin "/" (basename file)))
- (delete-file file))
- (find-files oldbin script?))))))))
+ (list #:modules
+ `(,@%gnu-build-system-modules
+ (ice-9 textual-ports))
+ #:test-target "test"
+ #:configure-flags
+ #~(list "--disable-native") ;don't generate code for the build CPU
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ (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.
+ (apply invoke "./configure"
+ (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 _
+ (let ((oldbin (string-append #$output "/bin"))
+ (newbin (string-append #$output:utils "/bin"))
+ (script? (lambda* (file #:rest _)
+ (call-with-input-file file
+ (lambda (port)
+ (char=? #\# (peek-char port)))))))
+ (mkdir-p newbin)
+ (for-each (lambda (file)
+ (link file (string-append newbin "/" (basename file)))
+ (delete-file file))
+ (find-files oldbin script?))))))))
(outputs '("out" "utils"))
(inputs
(list libaio python zlib))