guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: idris: Fix for Haskell build system changes.


From: guix-commits
Subject: branch master updated: gnu: idris: Fix for Haskell build system changes.
Date: Sat, 29 Aug 2020 11:32:14 -0400

This is an automated email from the git hooks/post-receive script.

samplet pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 5aaa199  gnu: idris: Fix for Haskell build system changes.
5aaa199 is described below

commit 5aaa1995922285d53a97824f2b83bdb71ec9fdd0
Author: Timothy Sample <samplet@ngyro.com>
AuthorDate: Sat Aug 29 09:54:53 2020 -0400

    gnu: idris: Fix for Haskell build system changes.
    
    See also 9e5496e0ae0ee8f638ca93949ecca314fdb9251e and
    718dc7d4a5e5d26cac80c79d78535677e0379dc8.
    
    * gnu/packages/idris.scm (idris)[arguments]: Add a phase that sets
    'LD_LIBRARY_PATH', and one that restores the 'libidris_rts.a'
    library back to the default output.
---
 gnu/packages/idris.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm
index 14b1688..1982d7c 100644
--- a/gnu/packages/idris.scm
+++ b/gnu/packages/idris.scm
@@ -90,6 +90,11 @@
              "-fFFI" "-fGMP")
        #:phases
        (modify-phases %standard-phases
+         ;; This allows us to call the 'idris' binary before installing.
+         (add-after 'unpack 'set-ld-library-path
+           (lambda _
+             (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/dist/build"))
+             #t))
          (add-after 'unpack 'update-constraints
            (lambda _
              (substitute* "idris.cabal"
@@ -116,7 +121,18 @@
                (setenv "TASTY_NUM_THREADS" (number->string 
(parallel-job-count)))
                (setenv "IDRIS_CC" "gcc") ;Needed for creating executables
                (setenv "PATH" (string-append out "/bin:" (getenv "PATH")))
-               (apply (assoc-ref %standard-phases 'check) args)))))))
+               (apply (assoc-ref %standard-phases 'check) args))))
+         (add-before 'check 'restore-libidris_rts
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; The Haskell build system moves this library to the
+             ;; "static" output.  Idris only knows how to find it in the
+             ;; "out" output, so we restore it here.
+             (let ((out (assoc-ref outputs "out"))
+                   (static (assoc-ref outputs "static"))
+                   (filename "/lib/idris/rts/libidris_rts.a"))
+               (rename-file (string-append static filename)
+                            (string-append out filename))
+               #t))))))
     (native-search-paths
      (list (search-path-specification
             (variable "IDRIS_LIBRARY_PATH")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]