[bug#76434,core-updates] gnu: ruby-racc: Update to 1.8.1.

Message ID 20250220073245.11523-1-gemmaro.dev@gmail.com
State New
Headers
Series [bug#76434,core-updates] gnu: ruby-racc: Update to 1.8.1. |

Commit Message

gemmaro Feb. 20, 2025, 7:32 a.m. UTC
  * gnu/packages/ruby.scm (ruby-racc): Update to 1.8.1.
[source]: Use the Git repository for tests.
[arguments]<#:tests>: Remove the disabling of tests.
<#:phases>: Add the compile phase before the build phase to support the
optional native extension for performance improvements.
[native-inputs]: Remove Hoe and add test-unit-ruby-core as a test dependency.

Change-Id: Ifef15fb29b5178a4eea85b524b3c4a5c11b5f2da
---
 gnu/packages/ruby.scm | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
  

Comments

gemmaro Feb. 20, 2025, 7:39 a.m. UTC | #1
tags 76434 - core-updates
tags 76434 + ruby-team
  

Patch

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 774e0df472..b993293146 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -32,7 +32,7 @@ 
 ;;; Copyright © 2022-2024 Remco van 't Veer <remco@remworks.net>
 ;;; Copyright © 2022 Taiju HIGASHI <higashi@taiju.info>
 ;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
-;;; Copyright © 2023, 2024 gemmaro <gemmaro.dev@gmail.com>
+;;; Copyright © 2023, 2024, 2025 gemmaro <gemmaro.dev@gmail.com>
 ;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2023, 2024 Hartmut Goebel <h.goebel@crazy-compilers.com>
@@ -8765,19 +8765,27 @@  (define-public ruby-nokogiri-diff
 (define-public ruby-racc
   (package
     (name "ruby-racc")
-    (version "1.5.2")
+    (version "1.8.1")
     (source
      (origin
-       (method url-fetch)
-       (uri (rubygems-uri "racc" version))
+       (method git-fetch) ;for tests
+       (uri (git-reference
+             (url "https://github.com/ruby/racc")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "178k7r0xn689spviqzhvazzvxfq6fyjldxb3ywjbgipbfi4s8j1g"))))
+         "1sg2mqp6yxdxrn9kbbsxkd6930fxvm4yjl8knsc0wq6fkipnhm8q"))))
     (build-system ruby-build-system)
     (arguments
-     `(#:tests? #f))            ; Fails while parsing test instructions.
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'compile
+            (lambda _
+              (invoke "rake" "compile"))))))
     (native-inputs
-     (list ruby-hoe ruby-rake-compiler))
+     (list ruby-rake-compiler ruby-test-unit-ruby-core))
     (synopsis "LALR(1) parser generator for Ruby")
     (description
      "Racc is a LALR(1) parser generator.  It is written in Ruby itself, and