mbakke pushed a commit to branch staging
in repository guix.

commit 0899352f970b321c22ff971bb674cb4a131587c9
Author: Marius Bakke <[email protected]>
Date:   Sun Jun 4 22:46:10 2017 +0200

    gnu: ruby-ansi: Fix build failure with [email protected].
    
    * gnu/packages/ruby.scm (ruby-ansi)[arguments]<#:phases>: Add 
'replace-broken-symlink'.
---
 gnu/packages/ruby.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index c91be6f..8681881 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2015 Ricardo Wurmus <[email protected]>
 ;;; Copyright © 2015, 2016, 2017 Ben Woodcroft <[email protected]>
 ;;; Copyright © 2017 ng0 <[email protected]>
+;;; Copyright © 2017 Marius Bakke <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3586,7 +3587,19 @@ It has built-in support for the legacy 
@code{cookies.txt} and
          ;; be require'd.
          (replace 'check
            (lambda _
-             (zero? (system* "ruby" "-Ilib" "-r" "ansi")))))))
+             (zero? (system* "ruby" "-Ilib" "-r" "ansi"))))
+         (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")))
+               ;; XXX: This symlink is broken since ruby 2.4.
+               ;; 
https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
+               (delete-file file)
+               (symlink "../.index" file)
+               #t))))))
     (synopsis "ANSI escape code related libraries")
     (description
      "This package is a collection of ANSI escape code related libraries

Reply via email to