summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2022-10-22 20:34:37 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-11-07 22:00:47 +0100
commit95c494e298f565e609f6c08621e1a293a385b3d1 (patch)
tree69e82ba2508b72440eba2e963883ea345e917f36 /gnu
parent95db2d4946ff4f3e2bee5b415ef54c384694c1a7 (diff)
gnu: cbqn: Rewrite in terms of cbqn-bootstrap.
* gnu/packages/bqn.scm (cbqn)[arguments]: Use substitute-keyword-arguments to preserve options from cbqn-bootstrap.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bqn.scm59
1 files changed, 28 insertions, 31 deletions
diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index 8a1b1dfba2..bc714c3d49 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -171,37 +171,34 @@ by APL.")
(name "cbqn")
(outputs '("out" "lib"))
(arguments
- (list #:make-flags '(list "shared-o3" "o3")
- #:phases #~(modify-phases %standard-phases
- (delete 'configure)
- (add-before 'build 'generate-bytecode
- (lambda* (#:key inputs #:allow-other-keys)
- (system (string-append #+dbqn
- "/bin/dbqn ./genRuntime "
- #+bqn-sources))))
- (replace 'check
- (lambda* (#:key inputs tests? #:allow-other-keys)
- (when tests?
- (system (string-append "./BQN -M 1000 \""
- #+bqn-sources
- "/test/this.bqn\""))
- (map (lambda (x)
- (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")))
- (mkdir-p bin)
- (copy-recursively "BQN"
- (string-append bin "/bqn"))
- (install-file "libcbqn.so" lib)))))))
+ (substitute-keyword-arguments (strip-keyword-arguments
+ (list #:tests?)
+ (package-arguments cbqn-bootstrap))
+ ((#:make-flags flags #~(list))
+ #~(cons* "shared-o3" "o3" #$flags))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (replace 'check
+ (lambda* (#:key inputs tests? #:allow-other-keys)
+ (when tests?
+ (system (string-append "./BQN -M 1000 \""
+ #+bqn-sources
+ "/test/this.bqn\""))
+ (map (lambda (x)
+ (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")))
+ (mkdir-p bin)
+ (copy-recursively "BQN"
+ (string-append bin "/bqn"))
+ (install-file "libcbqn.so" lib))))))))
(native-inputs (list dbqn
bqn-sources
libffi