[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/12: gnu: Add cbqn.
From: |
guix-commits |
Subject: |
05/12: gnu: Add cbqn. |
Date: |
Wed, 31 Aug 2022 18:58:33 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit dc9a5257a9aeeb159ceb6cfad816c335586758be
Author: Christopher Rodriguez <yewscion@gmail.com>
AuthorDate: Wed Aug 10 13:28:00 2022 -0400
gnu: Add cbqn.
* gnu/packages/bqn.scm (cbqn): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/bqn.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index 1462f2d964..c4e0f39efb 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -175,3 +175,50 @@ by APL.")
(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))))
- branch master updated (a3b5b86db7 -> 0424a58463), guix-commits, 2022/08/31
- 01/12: gnu: Add dbqn., guix-commits, 2022/08/31
- 04/12: gnu: Add singeli-sources., guix-commits, 2022/08/31
- 03/12: gnu: Add cbqn-bootstrap., guix-commits, 2022/08/31
- 05/12: gnu: Add cbqn.,
guix-commits <=
- 02/12: gnu: Add bqn-sources., guix-commits, 2022/08/31
- 08/12: gnu: tdlib: Update to 1.8.4., guix-commits, 2022/08/31
- 06/12: gnu: perf-tools: Patch executable file names., guix-commits, 2022/08/31
- 07/12: gnu: tdlib: Use G-expressions., guix-commits, 2022/08/31
- 09/12: gnu: Add guile-srfi-128., guix-commits, 2022/08/31
- 11/12: gnu: Add texlive-biblatex-apa., guix-commits, 2022/08/31
- 10/12: gnu: Add guile-srfi-146., guix-commits, 2022/08/31
- 12/12: gnu: pipe-viewer: Update to 0.2.3., guix-commits, 2022/08/31