diff options
author | Ben Woodcroft <donttrustben@gmail.com> | 2016-01-08 17:29:39 +1000 |
---|---|---|
committer | Ben Woodcroft <donttrustben@gmail.com> | 2016-01-11 21:58:55 +1000 |
commit | 761e7042f633b05bee988aeb941d7c7bf20b9b3c (patch) | |
tree | 7915d5788a1200016e28bd39fd2e68ec91ed5739 /guix | |
parent | 048036aee522d6a03436bf530d139ec26d8a438e (diff) | |
download | gnu-guix-761e7042f633b05bee988aeb941d7c7bf20b9b3c.tar gnu-guix-761e7042f633b05bee988aeb941d7c7bf20b9b3c.tar.gz |
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.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/build/ruby-build-system.scm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm index 2685da1a72..18da43866d 100644 --- a/guix/build/ruby-build-system.scm +++ b/guix/build/ruby-build-system.scm @@ -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"))) |