GNU bug report logs -
#56989
[PATCH v1 1/5] gnu: bqn: Add bqn.scm and dbqn package.
Previous Next
Full log
Message #76 received at 56989 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/bqn.scm: Add cbqn package.
---
gnu/packages/bqn.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index a87534fcd5..95bc2f2eab 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -169,3 +169,49 @@ (define singeli-sources
(file-name (git-file-name "singeli-sources" commit))
(sha256
(base32 "1rr4l7ijzcg25n2igi1mzya6qllh5wsrf3m5i429rlgwv1fwvfji")))))
+(define-public cbqn
+ (package
+ (inherit cbqn-bootstrap)
+ (name "cbqn")
+ (outputs '("out" "lib"))
+ (arguments
+ (list #:make-flags '(list "shared-o3" "o3n-singeli")
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'link-singeli
+ (lambda* (#:key inputs #:allow-other-keys)
+ (symlink #+singeli-sources "Singeli")))
+ (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)))))))
+ (native-inputs (list dbqn
+ bqn-sources
+ singeli-sources
+ libffi
+ clang-toolchain
+ linux-libre-headers))))
--
2.37.1
This bug report was last modified 2 years and 263 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.