[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: ruby: Fix build failures after updating to 2.4.2.
From: |
Marius Bakke |
Subject: |
02/02: gnu: ruby: Fix build failures after updating to 2.4.2. |
Date: |
Sun, 24 Sep 2017 14:30:16 -0400 (EDT) |
mbakke pushed a commit to branch staging
in repository guix.
commit 859620e51db0b7ffb666cd47146eca4fd4d6ba63
Author: Marius Bakke <address@hidden>
Date: Sun Sep 24 20:10:57 2017 +0200
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.
---
gnu/packages/ruby.scm | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 58549e8..ab8e572 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)