GNU bug report logs - #78826
[PATCH ruby-team 00/88] Switch to ruby@3.3 and build -P1 ruby@3.3

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Wed, 18 Jun 2025 14:22:02 UTC

Severity: normal

Tags: patch

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


Message #206 received at 78826 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 78826 <at> debbugs.gnu.org
Cc: Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH 68/88] gnu: ruby-hydra: Fix build with Ruby <at> 3.3.
Date: Wed, 18 Jun 2025 16:27:55 +0200
* gnu/packages/ruby-xyz.scm
  (ruby-hydra-minimal)[arguments]{phases}: Add phase 'fix-ruby-3.3-build.
  (ruby-hydra)[arguments]: Inherit from ruby-hydra-minimal phases.
  (ruby-hydra-minimal/pinned)[arguments]: Rewrite to avoid derivation
  change, stop inheriting from ruby-hydra-minimal phases.
---
 gnu/packages/ruby-xyz.scm | 38 ++++++++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/ruby-xyz.scm b/gnu/packages/ruby-xyz.scm
index c844a26f77..2ad8d10574 100644
--- a/gnu/packages/ruby-xyz.scm
+++ b/gnu/packages/ruby-xyz.scm
@@ -3511,8 +3511,15 @@ (define-public ruby-hydra-minimal
                   "1swzab7i4cqk1bck7p5m3bh526jh0v6m9qq720r3270zbjc8x8z3"))))
       (build-system ruby-build-system)
       (arguments
-       ;; Avoid rspec dependency.
-       '(#:tests? #f))
+       (list
+        #:tests? #f ; Avoid rspec dependency.
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'fix-ruby-3.3-build
+              (lambda _
+                (substitute* "lib/hydra.rb"
+                  (("exists\\?")
+                   "exist?")))))))
       (synopsis "Ruby hyphenation patterns")
       (description
        "ruby-hydra-minimal is a Ruby library for working with hyphenation patterns.
@@ -3525,24 +3532,27 @@ (define-public ruby-hydra-minimal/pinned
    (package
      (inherit ruby-hydra-minimal)
      (arguments
-      (cons* #:ruby ruby-2.7
-             (package-arguments ruby-hydra-minimal))))))
+      (list
+       #:tests? #f
+       #:ruby ruby-2.7)))))
 
 (define-public ruby-hydra
   (package
     (inherit ruby-hydra-minimal)
     (name "ruby-hydra")
     (arguments
-     (list
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'make-files-writable
-            (lambda _
-              (for-each make-file-writable (find-files "."))))
-          (replace 'check
-            (lambda* (#:key tests? #:allow-other-keys)
-              (when tests?
-                (invoke "rspec")))))))
+     (substitute-keyword-arguments (package-arguments ruby-hydra-minimal)
+       ((#:tests? tests? #t)
+        #t)
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            (add-after 'unpack 'make-files-writable
+              (lambda _
+                (for-each make-file-writable (find-files "."))))
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (invoke "rspec"))))))))
     (native-inputs
      (list ruby-rspec))
     (description
-- 
2.49.0





This bug report was last modified 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.