summary refs log tree commit diff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-03-21 21:38:19 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-03-21 21:38:19 -0400
commit49b350fafc2c3ea1db66461b73d4e304cd13ec92 (patch)
tree9b9b1a4a383b5175241ae6b91b83de0590f13983 /gnu/packages/ruby.scm
parent03b5668a035ba96c9690476078c5ee1d5793f3e2 (diff)
parente584a093f943be216fdc93895281fde835836b8d (diff)
downloadguix-49b350fafc2c3ea1db66461b73d4e304cd13ec92.tar.gz
Merge branch 'master' into staging.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm38
1 files changed, 24 insertions, 14 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 121948b4fc..acccc4d4c4 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -200,6 +200,20 @@ a focus on simplicity and productivity.")
         (base32
          "0h2w2ms4gx2s96v3lzdr3add94bd2qqkhdjzaycmaqhg21rpf3jp"))))))
 
+(define-public ruby-3.1
+  (package
+    (inherit ruby-2.7)
+    (version "3.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
+                           (version-major+minor version)
+                           "/ruby-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1akcl7vhmwfm6ybj7493kzy58ykh2r39ri9f4xfm2xmhg1msmvvs"))))))
+
 (define-public ruby-2.5
   (package
     (inherit ruby-2.6)
@@ -7358,11 +7372,11 @@ library.")
         (base32
          "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
     (build-system ruby-build-system)
-    (arguments '(#:tests? #t
-                 #:phases (modify-phases %standard-phases
+    (arguments '(#:phases (modify-phases %standard-phases
                             (replace 'check
-                              (lambda _
-                                (invoke "rspec"))))))
+                              (lambda* (#:key tests? #:allow-other-keys)
+                                (when tests?
+                                  (invoke "rspec")))))))
     (native-inputs
      (list ruby-rspec))
     (propagated-inputs
@@ -7486,7 +7500,8 @@ navigation capabilities to @code{pry}, using @code{byebug}.")
        (modify-phases %standard-phases
          (add-before 'check 'skip-dubious-test
            (lambda _
-             ,@(if (target-riscv64?)
+             ,@(if (or (target-riscv64?)
+                       (target-ppc32?))
                  ;; This unreliable test can fail with "Expected 32 to be <= 25."
                  '((substitute* "test/test_stackprof.rb"
                      ((".*assert_operator profile\\[:missed_samples.*") "")))
@@ -8265,8 +8280,8 @@ definitions.")
     (inherit ruby-yard)
     (name "ruby-yard-with-tests")
     (arguments
-     (substitute-keyword-arguments (package-arguments ruby-yard)
-       ((#:tests? _ #t) #t)
+     (substitute-keyword-arguments
+         (strip-keyword-arguments '(#:tests?) (package-arguments ruby-yard))
        ((#:test-target _ "default") "default")
        ((#:phases phases '%standard-phases)
         `(modify-phases ,phases
@@ -8279,13 +8294,8 @@ definitions.")
                  (delete-file "Gemfile")
                  ;; $HOME needs to be set to somewhere writeable for tests to
                  ;; run.
-                 (setenv "HOME" "/tmp"))
-               #t))))))
-    (native-inputs
-     `(("ruby-rspec" ,ruby-rspec)
-       ("ruby-rack" ,ruby-rack)
-       ("ruby-redcloth" ,ruby-redcloth)
-       ("ruby-asciidoc" ,ruby-asciidoctor)))))
+                 (setenv "HOME" "/tmp"))))))))
+    (native-inputs (list ruby-rspec ruby-rack ruby-redcloth ruby-asciidoctor))))
 
 (define-public ruby-spectroscope
   (package