Christopher Rodriguez wrote 3 years ago
(address . guix-patches@gnu.org)(name . Christopher Rodriguez)(address . yewscion@gmail.com)
---
gnu/packages/bqn.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
Toggle diff (56 lines)
diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index 221ed9eaaa..0e26706476 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -125,3 +125,49 @@ (define bqn-bytecode-sources
purposes.")
(home-page "https://github.com/mlochbaum/BQN.git")
(license license:gpl3))))
+(define cbqn-bootstrap
+ (let* ((tag "0")
+ (revision "1")
+ (commit "88f65850fa6ac28bc50886c5942652f21d5be924")
+ (hash "0bqwpvzwp2v20k2l725cwxx4fkvisniw9nls3685wd0fa3agpb47")
+ (version (git-version tag revision commit)))
+ (package
+ (name "cbqn-bootstrap")
+ (version version)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dzaima/CBQN")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ hash))))
+ (build-system gnu-build-system)
+ (outputs '("out"))
+ (arguments
+ (list #:tests? #f ;Skipping Tests for Bootstrap.
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'generate-bytecode
+ (lambda* (#:key inputs #:allow-other-keys)
+ (system (string-append #$(this-package-native-input
+ "dbqn")
+ "/bin/dbqn ./genRuntime "
+ #$(this-package-input
+ "bqn-bytecode-sources") "/share/"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (mkdir-p (string-append #$output "/bin"))
+ (chmod "BQN" 493)
+ (copy-recursively "BQN"
+ (string-append #$output
+ "/bin/bqn")))))))
+ (native-inputs (list dbqn openjdk17 clang-toolchain))
+ (inputs (list bqn-bytecode-sources libffi))
+ (synopsis "BQN implementation in C")
+ (description
+ "The expected implementation for the BQN language,
+according to the official documentation of that specification.")
+ (home-page "https://mlochbaum.github.io/BQN/")
+ (license license:gpl3))))
--
2.37.1