[PATCH] gnu: Add ruby-3.3.

  • Done
  • quality assurance status badge
Details
2 participants
  • Andreas Enge
  • Daniel Littlewood
Owner
unassigned
Submitted by
Andreas Enge
Severity
normal
A
A
Andreas Enge wrote on 14 Jun 19:24 +0200
(address . guix-patches@gnu.org)(name . Andreas Enge)(address . andreas@enge.fr)
28cc7c5071b82b981d2a8c07cd283827baff0716.1718385885.git.andreas@enge.fr
* gnu/packages/ruby.scm (ruby-3.3): New variable.

Change-Id: Ie26b97fdcea75e7eddabb2dba3fc91882be41b34
---
gnu/packages/ruby.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (29 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 5c1e666bb0..9547481caf 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -292,6 +292,20 @@ (define-public ruby-3.2
(modify-inputs (package-inputs ruby-3.1)
(prepend libyaml)))))
+(define-public ruby-3.3
+ (package
+ (inherit ruby-3.2)
+ (version "3.3.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
+ (version-major+minor version)
+ "/ruby-" version ".tar.xz"))
+ (sha256
+ (base32
+ "07pwf3zkf7idl95agfjbv2lvamcp0spp0znqp9arb71ri19rkh43"))))))
+
(define-public ruby ruby-3.1)
(define-public mruby

base-commit: 7770e4140cddd5dc9c9879cb2bfcbd6cd4de59a0
--
2.45.1
A
A
Andreas Enge wrote on 16 Jun 12:27 +0200
Re: Ruby without RVM - what to do if the version I want is missing?
(name . Daniel Littlewood)(address . danielittlewood@gmail.com)
Zm6-CcTV_LEFlHno@jurong
Hello,

Am Fri, Jun 14, 2024 at 07:36:07PM +0200 schrieb Andreas Enge:
Toggle quote (16 lines)
> (define-public ruby-3.3
> (package
> (inherit ruby-3.2)
> (version "3.3.3")
> (source
> (origin
> (method url-fetch)
> (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
> (version-major+minor version)
> "/ruby-" version ".tar.xz"))
> (sha256
> (base32
> "07pwf3zkf7idl95agfjbv2lvamcp0spp0znqp9arb71ri19rkh43"))))))
> I have sent this patch, see
> https://issues.guix.gnu.org/71559

QA has given the green light, so I have pushed this new version to master.
You should see it after a "guix pull".

Andreas
Closed
D
D
Daniel Littlewood wrote on 17 Jun 21:09 +0200
(name . Andreas Enge)(address . andreas@enge.fr)
CAFDSbVfMNmpCUrhwi79trs4pSGCTzMRptkBNSuOnezs4j=rvqw@mail.gmail.com
Hi, thank you all very much for the help,

Thank you Andreas for your patch. I wasn't sure quite how to use it at
first, but after some looking I found out I could put it into a local
channel. So I made a file ~/my-channel/ruby.scm with contents

(define-module (ruby)
#:use-module (guix packages)
#:use-module (guix licenses)
#:use-module (guix download)
#:use-module (guix utils)
#:use-modules (gnu packages ruby))
<the contents of your patch here>

That worked well.
guix shell ruby@3.3 # fails as expected
guix shell -L ~/guix-scout ruby@3.3 # works
ruby --version
ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [x86_64-linux]

However I wanted to have a more sophisticated guix shell, called from
a file. Something like what Remco suggested, but this was just what I
could cobble together and it isn't exactly the same.

The file guix.scm contains (by the way, why is the use-modules syntax
different here?)
(use-modules (guix packages)
(guix download)
(guix utils)
(guix build-system ruby)
(ruby))
(package
(name "my-project")
(version "1.0.0")
(license #f)
(source #f)
(build-system ruby-build-system) ; "no build system" was not an option
(propagated-inputs (list ruby-3.3))
(synopsis "")
(description "")
(homepage ""))

Now I become confused:
guix shell -L ~/my-channel -D -f guix.scm # works, as expected
ruby --version
ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
# this is *not* the host ruby:
exit
ruby --version
ruby 2.7.8p225 (2023-03-30 revision 1fd455848) [x86_64-linux]

I don't know where it is getting 3.1.4 from! I have not written it
anywhere. I do recognise it - I think I have previously installed it
at some point. But I don't know where it's being pulled from - some
cache? It looks like Remco's approach using manifests should work, but
I wonder: does anyone know what's wrong with my guix.scm?

Best wishes,
Dan

On Sun, Jun 16, 2024 at 11:27?AM Andreas Enge <andreas@enge.fr> wrote:
Toggle quote (25 lines)
>
> Hello,
>
> Am Fri, Jun 14, 2024 at 07:36:07PM +0200 schrieb Andreas Enge:
> > (define-public ruby-3.3
> > (package
> > (inherit ruby-3.2)
> > (version "3.3.3")
> > (source
> > (origin
> > (method url-fetch)
> > (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
> > (version-major+minor version)
> > "/ruby-" version ".tar.xz"))
> > (sha256
> > (base32
> > "07pwf3zkf7idl95agfjbv2lvamcp0spp0znqp9arb71ri19rkh43"))))))
> > I have sent this patch, see
> > https://issues.guix.gnu.org/71559
>
> QA has given the green light, so I have pushed this new version to master.
> You should see it after a "guix pull".
>
> Andreas
>
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 71559@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 71559
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch