From 761e7042f633b05bee988aeb941d7c7bf20b9b3c Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Fri, 8 Jan 2016 17:29:39 +1000 Subject: 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. --- guix/build/ruby-build-system.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'guix') 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"))) -- cgit v1.2.3