Subject: Re: bug#61799: [PATCH] gnu: Add ruby-minima.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 08 Jun 2023 23:33:29 +0200

Hi,

gemmaro <[email-masked]> skribis:

> I added a test by `jekyll build`.
>
> * gnu/packages/ruby.scm (ruby-minima): New variable.

Applied with the changes below.  Thanks!

Ludo’.

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index bdd2686016..f28ad97e11 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5270,15 +5270,16 @@ (define-public ruby-minima
                (base32
                 "1gk7jmriiswda1ykjzpsw9cpiya4m9n0yrh0h6xnrc8zcfy543jj"))))
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (replace 'check
-                    (lambda _
-                      (invoke "jekyll" "build")
-                      ;; Without the following, an attempt to remove
-                      ;; minima-<version>.gem is made during installation,
-                      ;; which will fail.
-                      (delete-file ,(string-append "_site/minima-" version
-                                                   ".gem")))))))
+     (list #:phases #~(modify-phases %standard-phases
+                        (replace 'check
+                          (lambda* (#:key tests? #:allow-other-keys)
+                            (when tests?
+                              (invoke "jekyll" "build"))
+                            ;; Without the following, an attempt to remove
+                            ;; minima-<version>.gem is made during installation,
+                            ;; which will fail.
+                            (delete-file #$(string-append "_site/minima-"
+                                                          version ".gem")))))))
     (build-system ruby-build-system)
     (propagated-inputs (list jekyll ruby-jekyll-feed ruby-jekyll-seo-tag))
     (synopsis "Beautiful, minimal theme for Jekyll")