@@ -209,9 +209,16 @@ (define-public cbqn
(list #:tests?)
(package-arguments cbqn-bootstrap))
((#:make-flags flags #~(list))
- #~(cons* "shared-o3" "o3" #$flags))
+ #~(append #$flags '("shared-o3" "o3")))
((#:phases phases #~%standard-phases)
#~(modify-phases #$phases
+ (replace 'generate-bytecode
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir-p (string-append "./build/bytecodeLocal/gen"))
+ (system (string-append #+cbqn-bootstrap
+ "/bin/bqn ./build/genRuntime "
+ #+bqn-sources " ./build/bytecodeLocal")))))
(replace 'check
(lambda* (#:key inputs tests? #:allow-other-keys)
(when tests?
@@ -219,25 +226,21 @@ (define-public cbqn
#+bqn-sources
"/test/this.bqn\""))
(map (lambda (x)
- (system (string-append "./BQN ./test/" x
- ".bqn")))
+ (system (string-append "./BQN ./test/" x ".bqn")))
'("cmp" "equal" "copy" "random"))
(system "make -C test/ffi"))))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((bin (string-append (assoc-ref outputs "out")
- "/bin"))
- (lib (string-append (assoc-ref outputs "lib")
- "/lib"))
- (include (string-append (assoc-ref outputs "lib")
- "/include")))
- (mkdir-p bin)
- (rename-file "BQN" "bqn")
- (install-file "bqn" bin)
- (install-file "libcbqn.so" lib)
- (install-file "include/bqnffi.h" include))))))))
- (native-inputs (list dbqn
+ (add-after 'install 'install-lib-stuff
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((lib (string-append (assoc-ref outputs "lib")
+ "/lib"))
+ (include (string-append (assoc-ref outputs "lib")
+ "/include")))
+ (install-file "libcbqn.so" lib)
+ (install-file "include/bqnffi.h" include))))))))
+ (native-inputs (list cbqn-bootstrap
+ singeli
bqn-sources
libffi))
+ (inputs (list libffi))
(properties
`((tunable? . #t)))))