aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-09-24 20:10:57 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-09-24 20:28:10 +0200
commit859620e51db0b7ffb666cd47146eca4fd4d6ba63 (patch)
tree5d4c120a34d0f6f9e39d37b612335b87c90fa840
parent4f27a3337160da33c5fbc24e97c2428d31a50c90 (diff)
downloadguix-859620e51db0b7ffb666cd47146eca4fd4d6ba63.tar
guix-859620e51db0b7ffb666cd47146eca4fd4d6ba63.tar.gz
gnu: ruby: Fix build failures after updating to 2.4.2.
* gnu/packages/ruby.scm (gem-directory): New procedure. (ruby-ansi, ruby-ae)[arguments]: Use it to determine gem install directory instead of relying on the ruby (patch) version.
-rw-r--r--gnu/packages/ruby.scm19
1 files changed, 11 insertions, 8 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 58549e877d..ab8e572175 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -195,6 +195,11 @@ a focus on simplicity and productivity.")
(("/bin/sh") (which "sh")))
#t)))))))
+(define (gem-directory ruby-version)
+ "Return the relative gem install directory for RUBY-VERSION."
+ (string-append "/lib/ruby/gems/" (version-major+minor ruby-version)
+ ".0/gems"))
+
(define-public ruby-hoe
(package
(name "ruby-hoe")
@@ -3585,10 +3590,9 @@ It has built-in support for the legacy @code{cookies.txt} and
(add-before 'validate-runpath 'replace-broken-symlink
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (file (string-append out "/lib/ruby/gems/"
- ,(package-version ruby)
- "/gems/ansi-" ,version
- "/lib/ansi.yml")))
+ (file (string-append out
+ ,(gem-directory (package-version ruby))
+ "/ansi-" ,version "/lib/ansi.yml")))
;; XXX: This symlink is broken since ruby 2.4.
;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
(delete-file file)
@@ -3786,10 +3790,9 @@ requirement specifications systems like Cucumber.")
(add-before 'validate-runpath 'replace-broken-symlink
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (file (string-append out "/lib/ruby/gems/"
- ,(package-version ruby)
- "/gems/ae-" ,version
- "/lib/ae.yml")))
+ (file (string-append out
+ ,(gem-directory (package-version ruby))
+ "/ae-" ,version "/lib/ae.yml")))
;; XXX: This symlink is broken since ruby 2.4.
;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
(delete-file file)