Subject: [bug#78826] [PATCH 29/88] gnu: ruby-citrus: Fix build.

From: Nicolas Graves <[email-masked]>
Date: Wed, 18 Jun 2025 16:27:16 +0200

For some reason, during build citrus/version was not found.  It's use
is trivial, so subsitute Citrus.version directly.

* gnu/packages/ruby-xyz.scm (ruby-citrus): Fix build.
  [arrguemnts]{phases}: Add phase 'fix-citrus-version.
---
 gnu/packages/ruby-xyz.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gnu/packages/ruby-xyz.scm b/gnu/packages/ruby-xyz.scm
index cbad97a470..306a780852 100644
--- a/gnu/packages/ruby-xyz.scm
+++ b/gnu/packages/ruby-xyz.scm
@@ -15346,6 +15346,16 @@ (define-public ruby-citrus
        (sha256
         (base32 "197wrgqrddgm1xs3yvjvd8vkvil4h4mdrcp16jmd4b57rxrrr769"))))
     (build-system ruby-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'fix-citrus-version
+                 (lambda _
+                   (substitute* '("lib/citrus.rb" "citrus.gemspec")
+                     (("require 'citrus/version'")
+                      "")
+                     (("Citrus\\.version")
+                      (format #f "~s" #$version))))))))
     (home-page "https://mjackson.github.io/citrus/")
     (synopsis "Parsing Expressions for Ruby")
     (description "Citrus is a parsing library for Ruby that combines the
-- 
2.49.0