Hi Guix, I am trying to migrate from Debian to Guix. I am used to using RVM/rbenv to manage my ruby versions, but I don't think they're packaged for guix. They also obviously go against the grain of having guix manage all your software.
Long story short, my project requires Ruby 3.3.0, and the latest packaged version is 3.2.3. I have one main question and a followup. I read David Thompson's article "Ruby on Guix" so I will refer to that when I'm trying to describe things. (https://dthompson.us/posts/ruby-on-guix.html) 1. Suppose I am prepared to package Ruby 3.3.0 myself. I imagine that the packaging steps for 3.3.0 are extremely similar to 3.2.3 (probably they are identical). 1a. Which parts of the manual should I read to figure out how to write a new package? In the article there is one expression that begins `(package (name ruby-pry)...` and another `(define-public ruby-pg (package (name "ruby-pg")...`. What is the significance of define-public? 1b. If I manage to write a package expression for ruby 3.3.0, how do I then refer to it in my package.scm? I assume I have to require a module somehow, but I know very little scheme. 1c. Given that 3.3.0 is probably almost identical to 3.2.3, I would like to copy the original file and just tweak the details in my local project. I think I found that via packages.guix.gnu.org, here: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ruby.scm#n279. Is that the right expression (if I just copy it, should I expect it to work)? and for my followup, 2. Now imagine I've packaged it correctly and it works locally. I assume it would be a good thing to upstream that file. 2a. Is it actually desirable to upstream that? I notice not every version of ruby is packaged. But I think similarly to the previous section it should be not too hard to package every version (major and minor). Is there a principled reason not to do this, or is it just lack of maintainers? 2b. If there is a principled reason, like we don't want the guix packages repo to be too big, would it be useful for someone to have another channel where things like extra ruby versions are packaged and pre-built? I think this second question is important for people like me who are considering using Guix to replace things like RVM. It might be that guix proper has high standards for packaging, but I know I wouldn't mind if there was a lower standard for stuff being pulled naively via rubygems or whatever. Best wishes, thank you for reading, Dan