[bug#78826,22/88] gnu: ruby-oj: Update to 3.16.9.

Message ID 20250618142822.27945-22-ngraves@ngraves.fr
State New
Headers
Series Switch to ruby@3.3 and build -P1 ruby@3.3 |

Commit Message

Nicolas Graves June 18, 2025, 2:27 p.m. UTC
  * gnu/packages/ruby-xyz.scm (ruby-oj): Update to 3.16.9.
  [native-inputs]: Add bash-minimal.
  [arguments]{phases}: Add 'patch-bash phase.
---
 gnu/packages/ruby-xyz.scm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gnu/packages/ruby-xyz.scm b/gnu/packages/ruby-xyz.scm
index 6a933c099e..db6299b1b6 100644
--- a/gnu/packages/ruby-xyz.scm
+++ b/gnu/packages/ruby-xyz.scm
@@ -65,6 +65,7 @@  (define-module (gnu packages ruby-xyz)
   #:use-module (gnu packages)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages c)
   #:use-module (gnu packages check)
@@ -7609,7 +7610,7 @@  (define-public ruby-sync
 (define-public ruby-oj
   (package
     (name "ruby-oj")
-    (version "3.13.9")
+    (version "3.16.9")
     (source
      (origin
        (method git-fetch)
@@ -7621,19 +7622,24 @@  (define-public ruby-oj
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0a24zd28y58nyhjxgrpn2k9p72vzj3zbmdrcsbhwbdycj7nn9fpd"))))
+         "01zsvzgpn336lk93v8fr4lpjdl28hiq9iddxr7rcra3d28780fzi"))))
     (build-system ruby-build-system)
     (arguments
      '(#:test-target "test_all"
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch-bash
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "test/test_writer.rb"
+               (("/bin/bash")
+                (search-input-file inputs "bin/bash")))))
          (add-before 'check 'disable-bundler
            (lambda _
              (substitute* "Rakefile"
                (("Bundler\\.with_clean_env") "1.times")
                (("bundle exec ") "")))))))
     (native-inputs
-     (list bundler ruby-rspec ruby-rake-compiler))
+     (list bash-minimal bundler ruby-rspec ruby-rake-compiler))
     (synopsis "JSON parser for Ruby optimized for speed")
     (description
      "Oj is a JSON parser and generator for Ruby, where the encoding and