summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloe Brown <chloe.brown.00@outlook.com>2023-02-11 16:30:49 +0000
committerChloe Brown <chloe.brown.00@outlook.com>2023-02-11 16:30:49 +0000
commit7ac347e82c3447ea1a77326c8458adc8606dee6a (patch)
treeb371b9b7d37565776e3eec0ff1f0434867b0747c
parentdd2e2a0c76a3042e17bda94115bded50eeeee94c (diff)
idris2-git: fix build failures due to missing dir
-rw-r--r--yellowsquid/packages/idris.scm26
1 files changed, 20 insertions, 6 deletions
diff --git a/yellowsquid/packages/idris.scm b/yellowsquid/packages/idris.scm
index dd3403a..dc45f75 100644
--- a/yellowsquid/packages/idris.scm
+++ b/yellowsquid/packages/idris.scm
@@ -30,7 +30,7 @@
"-" idris-version-tag)
"")))
(ignore-test-failures? #false)
- (unwrap? #true)
+ (unwrap 1)
(tests? #true)
(historical? #false)
(hidden? #false) ; or (hidden? historical?)
@@ -112,8 +112,8 @@ build us (which is potentially recursive), or use the captured compiler output
(string-append "#!" (assoc-ref inputs "bash") "/bin/sh"))
(("/usr/bin/env")
(string-append (assoc-ref inputs "coreutils") "/bin/env"))))))
- ,@(if unwrap?
- `((add-after 'install 'unwrap
+ ,@(case unwrap
+ ((1) `((add-after 'install 'unwrap
(lambda* (#:key outputs #:allow-other-keys)
;; The bin/idris2 calls bin/idris2_app/idris2.so which is
;; the real executable, but it sets LD_LIBRARY_PATH
@@ -129,8 +129,21 @@ build us (which is potentially recursive), or use the captured compiler output
(delete-file (string-append out "/bin/idris2"))
(rename-file image (string-append out "/bin/idris2"))
(delete-file-recursively (string-append out "/bin/idris2_app"))
- (delete-file-recursively (string-append out "/lib"))))))
- '())
+ (delete-file-recursively (string-append out "/lib")))))))
+ ((2) `((add-after 'install 'unwrap
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Same as previous, except idris no longer creates a lib directory
+ (let* ((out (assoc-ref outputs "out"))
+ (image-base (string-append
+ out "/bin/idris2_app/idris2"))
+ (image (if (file-exists? image-base)
+ image-base
+ ;; For v0.5.1 and older.
+ (string-append image-base ".so"))))
+ (delete-file (string-append out "/bin/idris2"))
+ (rename-file image (string-append out "/bin/idris2"))
+ (delete-file-recursively (string-append out "/bin/idris2_app")))))))
+ (else '()))
,@(if with-bootstrap-shortcut?
`((replace 'build
(lambda* (#:key make-flags #:allow-other-keys)
@@ -202,7 +215,8 @@ Epigram and Agda.")
"0.6.0"
#:bootstrap-idris idris2-0.6.0
#:idris-version-tag "6-2e9c7f"
- #:with-bootstrap-shortcut? #false))
+ #:with-bootstrap-shortcut? #false
+ #:unwrap 2))
(define-public idris-setoid
(let ((commit "63e894b39a82e5a8b1edd06f1e03e6bfc5aa8c81")