diff options
| author | Timothy Sample <samplet@ngyro.com> | 2020-08-29 09:54:53 -0400 |
|---|---|---|
| committer | Timothy Sample <samplet@ngyro.com> | 2020-08-29 11:29:43 -0400 |
| commit | 5aaa1995922285d53a97824f2b83bdb71ec9fdd0 (patch) | |
| tree | 5ce7e398fa5d3591af178dbdb1010f582431cbf0 | |
| parent | 61fe9ced7da7eefceb931af0cb7363b721f5bdd6 (diff) | |
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.
| -rw-r--r-- | gnu/packages/idris.scm | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm index 14b16882f02..1982d7cf07b 100644 --- a/gnu/packages/idris.scm +++ b/gnu/packages/idris.scm | |||
| @@ -90,6 +90,11 @@ | |||
| 90 | "-fFFI" "-fGMP") | 90 | "-fFFI" "-fGMP") |
| 91 | #:phases | 91 | #:phases |
| 92 | (modify-phases %standard-phases | 92 | (modify-phases %standard-phases |
| 93 | ;; This allows us to call the 'idris' binary before installing. | ||
| 94 | (add-after 'unpack 'set-ld-library-path | ||
| 95 | (lambda _ | ||
| 96 | (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/dist/build")) | ||
| 97 | #t)) | ||
| 93 | (add-after 'unpack 'update-constraints | 98 | (add-after 'unpack 'update-constraints |
| 94 | (lambda _ | 99 | (lambda _ |
| 95 | (substitute* "idris.cabal" | 100 | (substitute* "idris.cabal" |
| @@ -116,7 +121,18 @@ | |||
| 116 | (setenv "TASTY_NUM_THREADS" (number->string (parallel-job-count))) | 121 | (setenv "TASTY_NUM_THREADS" (number->string (parallel-job-count))) |
| 117 | (setenv "IDRIS_CC" "gcc") ;Needed for creating executables | 122 | (setenv "IDRIS_CC" "gcc") ;Needed for creating executables |
| 118 | (setenv "PATH" (string-append out "/bin:" (getenv "PATH"))) | 123 | (setenv "PATH" (string-append out "/bin:" (getenv "PATH"))) |
| 119 | (apply (assoc-ref %standard-phases 'check) args))))))) | 124 | (apply (assoc-ref %standard-phases 'check) args)))) |
| 125 | (add-before 'check 'restore-libidris_rts | ||
| 126 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 127 | ;; The Haskell build system moves this library to the | ||
| 128 | ;; "static" output. Idris only knows how to find it in the | ||
| 129 | ;; "out" output, so we restore it here. | ||
| 130 | (let ((out (assoc-ref outputs "out")) | ||
| 131 | (static (assoc-ref outputs "static")) | ||
| 132 | (filename "/lib/idris/rts/libidris_rts.a")) | ||
| 133 | (rename-file (string-append static filename) | ||
| 134 | (string-append out filename)) | ||
| 135 | #t)))))) | ||
| 120 | (native-search-paths | 136 | (native-search-paths |
| 121 | (list (search-path-specification | 137 | (list (search-path-specification |
| 122 | (variable "IDRIS_LIBRARY_PATH") | 138 | (variable "IDRIS_LIBRARY_PATH") |
