Subject: [PATCH ruby-team 07/71] gnu: ruby-3.1: Inherit from ruby-3.2.

From: Nicolas Graves <[email-masked]>
Date: Sun, 16 Feb 2025 01:33:35 +0100

* gnu/packages/ruby.scm (ruby-3.1): Move after ruby-3.2.
  [inherit]: Switch to ruby-3.2.
---
 gnu/packages/ruby.scm | 31 +++++++++++++++++--------------
 1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 9c64077d61..0e644d5a1b 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -203,6 +203,23 @@ a focus on simplicity and productivity.")
         (base32
          "1jvyl8szfhinhqjiv40pfqck95lhikjx3iwxsylw9hiq481384b7"))))))
 
+(define-public ruby-3.1
+  (package
+    (inherit ruby-3.2)
+    (version "3.1.4")
+    (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
+         "0kzr792rk9n9yrqlyrkc1a0cmbk5y194f7v7p4vwjdk0ww860v8v"))))
+    (inputs
+     (modify-inputs (package-inputs ruby-3.2)
+       (delete "libyaml")))))
+
 (define-public ruby-2.6
   (package
     (name "ruby")
@@ -332,20 +349,6 @@ a focus on simplicity and productivity.")
      (modify-inputs (package-inputs ruby-2.7)
        (replace "openssl" openssl)))))
 
-(define-public ruby-3.1
-  (package
-    (inherit ruby-3.0)
-    (version "3.1.4")
-    (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
-         "0kzr792rk9n9yrqlyrkc1a0cmbk5y194f7v7p4vwjdk0ww860v8v"))))))
-
 (define-public ruby ruby-3.1)
 
 (define-public mruby
-- 
2.48.1