Subject: [bug#76880] [PATCH ruby-team] gnu: Add ruby-readline-ext.

From: gemmaro <[email-masked]>
Date: Sun, 9 Mar 2025 13:49:41 +0900

* gnu/packages/ruby-xyz.scm (ruby-readline-ext): New variable.

Change-Id: I89d8acc679d3fd4173298996386f25fa765789ae
---
 gnu/packages/ruby-xyz.scm | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ruby-xyz.scm b/gnu/packages/ruby-xyz.scm
index 688bf33459..c2f7b224b6 100644
--- a/gnu/packages/ruby-xyz.scm
+++ b/gnu/packages/ruby-xyz.scm
@@ -1,4 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2025 gemmaro <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,10 +19,14 @@
 (define-module (gnu packages ruby-xyz)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system ruby)
+  #:use-module (guix download)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix packages)
-  #:use-module (gnu packages))
+  #:use-module (gnu packages)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages readline)
+  #:use-module (gnu packages ruby))
 
 ;;; Commentary:
 ;;;
@@ -30,6 +35,35 @@ (define-module (gnu packages ruby-xyz)
 ;;; Code:
 
 
+(define-public ruby-readline-ext
+  (package
+    (name "ruby-readline-ext")
+    (version "0.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "readline-ext" version))
+       (sha256
+        (base32 "1a7aqd7cgrd5j8v639wzfnjawqac6vfz5djxn1acahs2afjx82j9"))))
+    (build-system ruby-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'compile
+            (lambda _
+              (invoke "rake" "compile"))))))
+    (native-inputs (list ruby-rake-compiler))
+    (inputs (list ncurses readline))
+    (synopsis "Ruby interface for GNU Readline")
+    (description
+     "The @samp{readline-ext} gem provides an interface to the GNU Readline
+library.  This gem allows Ruby programs to use line-editing and
+history capabilities for interactive programs with a command-line
+interface, enhancing user input handling.")
+    (home-page "https://github.com/ruby/readline-ext")
+    (license (list license:ruby license:bsd-2))))
+
 ;;;
 ;;; Avoid adding new packages to the end of this file. To reduce the chances
 ;;; of a merge conflict, place them above in alphabetic order.

base-commit: ba768e5a27feb6316afa5c4995cefd244e0f0e4b
-- 
2.48.1