aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/ci.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-10-12 22:05:39 +0200
committerLudovic Courtès <ludo@gnu.org>2023-10-12 22:14:34 +0200
commitf0c929f1e672a9c77ec681f7d548c26c63ff7b83 (patch)
tree4ba504e9cc64b2894d1afc6b7474cea3fe2f9d9d /gnu/packages/ci.scm
parent2588fb98f0a99dc90aa70b45039b56a15d1f6cb1 (diff)
downloadguix-f0c929f1e672a9c77ec681f7d548c26c63ff7b83.tar
guix-f0c929f1e672a9c77ec681f7d548c26c63ff7b83.tar.gz
gnu: cuirass: Use gexps.
* gnu/packages/ci.scm (cuirass)[arguments]: Rewrite as per ‘guix style -S arguments’.
Diffstat (limited to 'gnu/packages/ci.scm')
-rw-r--r--gnu/packages/ci.scm107
1 files changed, 56 insertions, 51 deletions
diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
index fb6ad49a41..e0bf59b616 100644
--- a/gnu/packages/ci.scm
+++ b/gnu/packages/ci.scm
@@ -29,6 +29,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module ((guix search-paths) #:select ($SSL_CERT_DIR))
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
@@ -75,59 +76,63 @@
"16d9ylzk8mwsgppfdxyl0k2mkwll7fq17d6v09406rqkgddxg3m2"))))
(build-system gnu-build-system)
(arguments
- `(#:modules ((guix build utils)
- (guix build gnu-build-system)
- (ice-9 match)
- (ice-9 rdelim)
- (ice-9 popen)
- (srfi srfi-1))
- #:configure-flags '("--localstatedir=/var") ;for /var/log/cuirass
- ;; XXX: HTTP tests fail on aarch64 due to Fibers errors, disable them
- ;; on that architecture for now.
- #:tests? ,(let ((s (or (%current-target-system)
- (%current-system))))
- (not (string-prefix? "aarch64" s)))
- #:parallel-tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-before 'bootstrap 'fix-version-gen
- (lambda _
- (patch-shebang "build-aux/git-version-gen")
+ (list #:modules `((guix build utils)
+ (guix build gnu-build-system)
+ (ice-9 match)
+ (ice-9 rdelim)
+ (ice-9 popen)
+ (srfi srfi-1))
+ #:configure-flags #~'("--localstatedir=/var") ;for /var/log/cuirass
+ ;; XXX: HTTP tests fail on aarch64 due to Fibers errors, disable them
+ ;; on that architecture for now.
+ #:tests? (let ((s (or (%current-target-system)
+ (%current-system))))
+ (not (string-prefix? "aarch64" s)))
+ #:parallel-tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'bootstrap 'fix-version-gen
+ (lambda _
+ (patch-shebang "build-aux/git-version-gen")
- (call-with-output-file ".tarball-version"
- (lambda (port)
- (display ,version port)))))
- (add-after 'install 'wrap-program
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; Wrap the 'cuirass' command to refer to the right modules.
- ;; Do so by collecting the subset of INPUTS that provides Guile
- ;; modules. This includes direct inputs as well as their
- ;; propagated inputs--e.g., 'guix' propagates 'guile-zstd'.
- (define (sub-directory suffix)
- (match-lambda
- ((label . directory)
- (let ((directory (string-append directory suffix)))
- (and (directory-exists? directory)
- directory)))))
+ (call-with-output-file ".tarball-version"
+ (lambda (port)
+ (display #$(package-version this-package) port)))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Wrap the 'cuirass' command to refer to the right modules.
+ ;; Do so by collecting the subset of INPUTS that provides Guile
+ ;; modules. This includes direct inputs as well as their
+ ;; propagated inputs--e.g., 'guix' propagates 'guile-zstd'.
+ (define (sub-directory suffix)
+ (match-lambda
+ ((label . directory)
+ (let ((directory (string-append directory suffix)))
+ (and (directory-exists? directory)
+ directory)))))
- (let* ((out (assoc-ref outputs "out"))
- (effective
- (read-line
- (open-pipe* OPEN_READ (which "guile")
- "-c" "(display (effective-version))")))
- (mods (filter-map (sub-directory
- (string-append "/share/guile/site/"
- effective))
- inputs))
- (objs (filter-map (sub-directory
- (string-append "/lib/guile/"
- effective
- "/site-ccache"))
- inputs)))
- (wrap-program (string-append out "/bin/cuirass")
- `("PATH" ":" prefix (,(string-append out "/bin")))
- `("GUILE_LOAD_PATH" ":" prefix ,mods)
- `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,objs))))))))
+ (let* ((out (assoc-ref outputs "out"))
+ (effective
+ (read-line
+ (open-pipe* OPEN_READ (which "guile") "-c"
+ "(display (effective-version))")))
+ (mods (filter-map (sub-directory
+ (string-append
+ "/share/guile/site/"
+ effective))
+ inputs))
+ (objs (filter-map (sub-directory
+ (string-append
+ "/lib/guile/" effective
+ "/site-ccache"))
+ inputs)))
+ (wrap-program (string-append out "/bin/cuirass")
+ `("PATH" ":" prefix
+ (,(string-append out "/bin")))
+ `("GUILE_LOAD_PATH" ":" prefix
+ ,mods)
+ `("GUILE_LOAD_COMPILED_PATH" ":" prefix
+ ,objs))))))))
(inputs
(list guile-3.0-latest
guile-avahi