mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
ruby: Abstract out path to GEM_HOME.
Previously paths to the GEM_HOME of certain Ruby packages were hard-coded, so packages failed to build when Ruby was updated to 2.3.0. * guix/build/ruby-build-system.scm (gem-home): New procedure. * gnu/packages/ruby.scm (ruby-metaclass, ruby-instantiator, ruby-introspection, ruby-mocha, ruby-minitest-tu-shim): Use it.
This commit is contained in:
parent
048036aee5
commit
761e7042f6
2 changed files with 67 additions and 40 deletions
|
@ -26,7 +26,8 @@
|
|||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:export (%standard-phases
|
||||
ruby-build))
|
||||
ruby-build
|
||||
gem-home))
|
||||
|
||||
;; Commentary:
|
||||
;;
|
||||
|
@ -136,3 +137,13 @@ GEM-FLAGS are passed to the 'gem' invokation, if present."
|
|||
(define* (ruby-build #:key inputs (phases %standard-phases)
|
||||
#:allow-other-keys #:rest args)
|
||||
(apply gnu:gnu-build #:inputs inputs #:phases phases args))
|
||||
|
||||
(define (gem-home store-path ruby-version)
|
||||
"Return a string to the gem home directory in the store given a STORE-PATH
|
||||
and the RUBY-VERSION used to build that ruby package"
|
||||
(string-append
|
||||
store-path
|
||||
"/lib/ruby/gems/"
|
||||
(regexp-substitute #f
|
||||
(string-match "^[0-9]+\\.[0-9]+" ruby-version)
|
||||
0 ".0")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue