unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Daniel Littlewood <danielittlewood@gmail.com>
To: Andreas Enge <andreas@enge.fr>
Cc: 71559-done@debbugs.gnu.org, Christopher Baines <mail@cbaines.net>,
	help-guix <help-guix@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	[thread overview]
Message-ID: <CAFDSbVfMNmpCUrhwi79trs4pSGCTzMRptkBNSuOnezs4j=rvqw@mail.gmail.com> (raw)
Message-ID: <20240617190913.Sd_trnrlvaeiK6gyC_WMjuoEv6YKpcGHjg1QLYkLY9c@z> (raw)
In-Reply-To: <Zm6-CcTV_LEFlHno@jurong>

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:
>
> 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
>




  reply	other threads:[~2024-06-18 10:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14 15:43 Ruby without RVM - what to do if the version I want is missing? Daniel Littlewood
2024-06-14 16:15 ` Felix Lechner via
2024-06-14 17:36 ` Andreas Enge
2024-06-15  6:39   ` Nils Landt
2024-06-16 10:27   ` Andreas Enge
2024-06-17 19:09     ` Daniel Littlewood [this message]
2024-06-17 19:09       ` [bug#71559] " Daniel Littlewood
2024-06-19 15:50       ` Remco van 't Veer
2024-06-20 17:09       ` Andreas Enge
2024-06-15  7:43 ` Remco van 't Veer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFDSbVfMNmpCUrhwi79trs4pSGCTzMRptkBNSuOnezs4j=rvqw@mail.gmail.com' \
    --to=danielittlewood@gmail.com \
    --cc=71559-done@debbugs.gnu.org \
    --cc=andreas@enge.fr \
    --cc=help-guix@gnu.org \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).