guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

07/07: gnu: fio: Use G-expressions.


From: guix-commits
Subject: 07/07: gnu: fio: Use G-expressions.
Date: Sun, 8 May 2022 17:31:36 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit 3d84a7296640774d723d66a2284956f3d05fb84c
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun May 1 02:00:00 2022 +0200

    gnu: fio: Use G-expressions.
    
    * gnu/packages/benchmark.scm (fio)[arguments]:
    Rewrite as G-expressions.
---
 gnu/packages/benchmark.scm | 61 +++++++++++++++++++++++-----------------------
 1 file 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]