diff mbox series

[bug#41036] ruby: Add 2.7.3.

Message ID SU9SP1GK5ozN3dN1IbeZUa5ZoKn4OaknSmtIwyUgE1fVQxqE_kwEIeDhexuNNh-12mB4SmxOy_1hI86iYDwHrvkTQ_l5UNS3FhK2XvVFL6Y=@protonmail.com
State Accepted
Headers show
Series [bug#41036] ruby: Add 2.7.3. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

guix--- via Guix-patches via May 2, 2020, 11:25 p.m. UTC
This patch adds Ruby 2.7.3, the latest release.

Comments

Christopher Baines May 13, 2020, 5:54 p.m. UTC | #1
Ryan Prior via Guix-patches via <guix-patches@gnu.org> writes:

> This patch adds Ruby 2.7.3, the latest release.

Hi Ryan,

Thanks for the patch, I've tweaked this to also pass --enable-shared to
ruby-2.7, as that's done for Ruby 2.6. I've pushed this to the master
branch as [1].

1: 1cc7d3404f8b6b9bf0407e4c752c38fcc188cdba

Perhaps we can use this bug now to track getting Ruby 2.7 as the default
Ruby in Guix. As Ludo said in a previous message, that'll need to happen
on core-updates, which I'll start looking in to...

Thanks again,

Chris
Ludovic Courtès June 17, 2020, 10:03 a.m. UTC | #2
Hi Christopher,

Christopher Baines <mail@cbaines.net> skribis:

> Ryan Prior via Guix-patches via <guix-patches@gnu.org> writes:
>
>> This patch adds Ruby 2.7.3, the latest release.
>
> Hi Ryan,
>
> Thanks for the patch, I've tweaked this to also pass --enable-shared to
> ruby-2.7, as that's done for Ruby 2.6. I've pushed this to the master
> branch as [1].
>
> 1: 1cc7d3404f8b6b9bf0407e4c752c38fcc188cdba
>
> Perhaps we can use this bug now to track getting Ruby 2.7 as the default
> Ruby in Guix. As Ludo said in a previous message, that'll need to happen
> on core-updates, which I'll start looking in to...

Would now be a good time to apply it?

Thanks,
Ludo’.
Christopher Baines June 19, 2020, 8:54 a.m. UTC | #3
Ludovic Courtès <ludo@gnu.org> writes:

> Hi Christopher,
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>> Ryan Prior via Guix-patches via <guix-patches@gnu.org> writes:
>>
>>> This patch adds Ruby 2.7.3, the latest release.
>>
>> Hi Ryan,
>>
>> Thanks for the patch, I've tweaked this to also pass --enable-shared to
>> ruby-2.7, as that's done for Ruby 2.6. I've pushed this to the master
>> branch as [1].
>>
>> 1: 1cc7d3404f8b6b9bf0407e4c752c38fcc188cdba
>>
>> Perhaps we can use this bug now to track getting Ruby 2.7 as the default
>> Ruby in Guix. As Ludo said in a previous message, that'll need to happen
>> on core-updates, which I'll start looking in to...
>
> Would now be a good time to apply it?

Yep, I've tried just now, but I was unsuccessful. Unfortunately I'm not
familiar with dealing with patches, and I couldn't seem to get this one
to apply at all.

Ryan, would you be able to rebase the relevant commit and share an
updated patch, that might help me apply it. Also, if there's a branch I
can pull from, that works as well.

Thanks,

Chris
Ryan Prior June 21, 2020, 3:02 a.m. UTC | #4
Here are the new patches you asked for, they should apply cleanly to master.

Ryan Prior (2):
  gnu: Renames ruby to ruby-2.6.
  gnu: Ruby: Update to 2.7.

 gnu/packages/ruby.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox series

Patch

From 0c10fb29338bc118c3fa442615aa6217960bb03b Mon Sep 17 00:00:00 2001
From: Ryan Prior <rprior@protonmail.com>
Date: Sat, 2 May 2020 18:17:00 -0500
Subject: [PATCH] gnu: Add ruby-2.7.

---
 gnu/packages/ruby.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 4d6d323442..67f344301c 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -128,6 +128,48 @@  a focus on simplicity and productivity.")
     (home-page "https://www.ruby-lang.org")
     (license license:ruby)))
 
+(define-public ruby-2.7
+  (package
+    (inherit ruby)
+    (version "2.7.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
+                           (version-major+minor version)
+                           "/ruby-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0674x98f542y02r7n2yv2qhmh97blqhi2mvh2dn5f000vlxlh66l"))
+       (modules '((guix build utils)))
+       (snippet `(begin
+                   ;; Remove bundled libffi
+                   (delete-file-recursively "ext/fiddle/libffi-3.2.1")
+                   #t))))
+    (arguments
+     `(#:test-target "test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'replace-bin-sh-and-remove-libffi
+           (lambda _
+             (substitute* '("configure.ac"
+                            "template/Makefile.in"
+                            "lib/rubygems/installer.rb"
+                            "ext/pty/pty.c"
+                            "io.c"
+                            "lib/mkmf.rb"
+                            "process.c"
+                            "test/rubygems/test_gem_ext_configure_builder.rb"
+                            "test/rdoc/test_rdoc_parser.rb"
+                            "test/ruby/test_rubyoptions.rb"
+                            "test/ruby/test_process.rb"
+                            "test/ruby/test_system.rb"
+                            "tool/rbinstall.rb")
+               (("/bin/sh") (which "sh")))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)))))
+
 (define-public ruby-2.4
   (package
     (inherit ruby)
-- 
2.17.1