Discussion:
[bug#27438] [PATCH] guix: build: ruby-build-system: Install to the vendor directory
(too old to reply)
Christopher Baines
2017-12-17 14:19:37 UTC
Permalink
Hey,

It's been a while since I looked at this, but I think it's still
relevant.

As a reminder, currently the search paths for the Ruby packages in Guix
are a bit off [1], which makes it difficult to use Ruby gems with
different versions of Ruby.

Rubygems by default installs gems to directories specific to the version
of Ruby, and this can be helpful when managing multiple versions of Ruby
and different sets of gem packages in a shared directory, but with Guix,
this isn't necessary, as the store can be used.

Ruby/Rubygems supports installing gems in to a vendor directory, which
is for gems installed by the package system [2]. While Guix blurs the
lines between the "package system" and the "user", using this vendor
directory might come in useful.

I've attached an updated patch, and successfully built every Ruby
package [3], as well as all of the packages that were changed in the
patch. The only failure was ruby-pg, which failed to build before this
patch.

Ideally when using specific versions of ruby, any gems that need to be
build with that version of ruby, would be. While this change doesn't do
that, it does simplify the search paths of ruby packages and the
packages for ruby gems.

Reading the bug report again, I think there was nearly consensus about
merging this, but I wanted to check if anyone has any comments or
experience with Ruby/Rubygems before merging this?

Thanks,

Chris

1:
scheme@(guile-user)> (use-modules (gnu packages) (guix packages) (guix search-paths) (ice-9 match))
scheme@(guile-user)> (map (lambda (ruby) (cons (package-version ruby) (match (package-native-search-paths ruby) (() #f) ((($ <search-path-specification> _ files)) files)))) (find-packages-by-name "ruby"))
$1 = (("2.4.3" "lib/ruby/gems/2.4.0") ("2.4.2" "lib/ruby/gems/2.4.0") ("2.3.6" "lib/ruby/gems/2.4.0") ("2.2.9" "lib/ruby/gems/2.4.0") ("2.1.10" "lib/ruby/gems/2.1.0") ("1.8.7-p374" . #f))

2: http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7/NEWS

3: guix build --keep-going $(guix package -s ruby- | recsel -P name | tr '\n' ' ')
Ben Woodcroft
2018-01-12 07:17:31 UTC
Permalink
Hi Chris,
Post by Christopher Baines
Hey,
It's been a while since I looked at this, but I think it's still
relevant.
As a reminder, currently the search paths for the Ruby packages in Guix
are a bit off [1], which makes it difficult to use Ruby gems with
different versions of Ruby.
Rubygems by default installs gems to directories specific to the version
of Ruby, and this can be helpful when managing multiple versions of Ruby
and different sets of gem packages in a shared directory, but with Guix,
this isn't necessary, as the store can be used.
Ruby/Rubygems supports installing gems in to a vendor directory, which
is for gems installed by the package system [2]. While Guix blurs the
lines between the "package system" and the "user", using this vendor
directory might come in useful.
I've attached an updated patch, and successfully built every Ruby
package [3], as well as all of the packages that were changed in the
patch. The only failure was ruby-pg, which failed to build before this
patch.
Ideally when using specific versions of ruby, any gems that need to be
build with that version of ruby, would be. While this change doesn't do
that, it does simplify the search paths of ruby packages and the
packages for ruby gems.
Reading the bug report again, I think there was nearly consensus about
merging this, but I wanted to check if anyone has any comments or
experience with Ruby/Rubygems before merging this?
I think go ahead with this one. It will be useful particularly when we
update ruby to 2.5.

ben
Christopher Baines
2018-01-14 22:24:17 UTC
Permalink
Post by Ben Woodcroft
Hi Chris,
Post by Christopher Baines
Hey,
It's been a while since I looked at this, but I think it's still
relevant.
As a reminder, currently the search paths for the Ruby packages in Guix
are a bit off [1], which makes it difficult to use Ruby gems with
different versions of Ruby.
Rubygems by default installs gems to directories specific to the version
of Ruby, and this can be helpful when managing multiple versions of Ruby
and different sets of gem packages in a shared directory, but with Guix,
this isn't necessary, as the store can be used.
Ruby/Rubygems supports installing gems in to a vendor directory, which
is for gems installed by the package system [2]. While Guix blurs the
lines between the "package system" and the "user", using this vendor
directory might come in useful.
I've attached an updated patch, and successfully built every Ruby
package [3], as well as all of the packages that were changed in the
patch. The only failure was ruby-pg, which failed to build before this
patch.
Ideally when using specific versions of ruby, any gems that need to be
build with that version of ruby, would be. While this change doesn't do
that, it does simplify the search paths of ruby packages and the
packages for ruby gems.
Reading the bug report again, I think there was nearly consensus about
merging this, but I wanted to check if anyone has any comments or
experience with Ruby/Rubygems before merging this?
I think go ahead with this one. It will be useful particularly when we
update ruby to 2.5.
Great, I've pushed this along with the other ruby build system change.

Thanks for reviewing,

Chris

Loading...