GNU bug report logs - #71559
[PATCH] gnu: Add ruby-3.3.

Previous Next

Package: guix-patches;

Reported by: Andreas Enge <andreas <at> enge.fr>

Date: Fri, 14 Jun 2024 17:26:02 UTC

Severity: normal

Tags: patch

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Littlewood <danielittlewood <at> gmail.com>
To: Andreas Enge <andreas <at> enge.fr>
Cc: 71559-done <at> debbugs.gnu.org, Christopher Baines <mail <at> cbaines.net>, help-guix <help-guix <at> gnu.org>
Subject: [bug#71559] Ruby without RVM - what to do if the version I want is missing?
Date: Mon, 17 Jun 2024 20:09:13 +0100
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 <at> 3.3 # fails as expected
guix shell -L ~/guix-scout ruby <at> 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 <at> enge.fr> wrote:
>
> 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
>




This bug report was last modified 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.