1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-13 10:30:43 +02:00

gnu: ruby-hydra: Fix build with Ruby@3.3.

* 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.
This commit is contained in:
Nicolas Graves 2025-06-18 16:27:55 +02:00 committed by Andreas Enge
parent 02bed4a9c5
commit 912b06840e
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -3511,8 +3511,15 @@ two hashes.")
"1swzab7i4cqk1bck7p5m3bh526jh0v6m9qq720r3270zbjc8x8z3")))) "1swzab7i4cqk1bck7p5m3bh526jh0v6m9qq720r3270zbjc8x8z3"))))
(build-system ruby-build-system) (build-system ruby-build-system)
(arguments (arguments
;; Avoid rspec dependency. (list
'(#:tests? #f)) #: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") (synopsis "Ruby hyphenation patterns")
(description (description
"ruby-hydra-minimal is a Ruby library for working with hyphenation patterns. "ruby-hydra-minimal is a Ruby library for working with hyphenation patterns.
@ -3549,16 +3556,18 @@ It is a low-dependency variant of ruby-hydra.")
(inherit ruby-hydra-minimal) (inherit ruby-hydra-minimal)
(name "ruby-hydra") (name "ruby-hydra")
(arguments (arguments
(list (substitute-keyword-arguments (package-arguments ruby-hydra-minimal)
#:phases ((#:tests? tests? #t)
#~(modify-phases %standard-phases #t)
(add-after 'unpack 'make-files-writable ((#:phases phases #~%standard-phases)
(lambda _ #~(modify-phases #$phases
(for-each make-file-writable (find-files ".")))) (add-after 'unpack 'make-files-writable
(replace 'check (lambda _
(lambda* (#:key tests? #:allow-other-keys) (for-each make-file-writable (find-files "."))))
(when tests? (replace 'check
(invoke "rspec"))))))) (lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "rspec"))))))))
(native-inputs (native-inputs
(list ruby-rspec)) (list ruby-rspec))
(description (description