diff options
author | aecepoglu <aecepoglu@fastmail.fm> | 2024-04-30 01:50:34 +0100 |
---|---|---|
committer | Guix Patches Tester <> | 2024-04-30 03:54:15 +0200 |
commit | 626e89c5dcb8c035762dc92bef4ba978efc30d0f (patch) | |
tree | d1cc03cc488c4473ea566342b8b32d03d07f67d2 | |
parent | 2b2bffd9ac4f27108e3da9dcba205c2bc76a3a8e (diff) | |
download | guix-patches-issue-69023.tar guix-patches-issue-69023.tar.gz |
gnu: bqn: Update cbqn.issue-69023
* gnu/packages/bqn.scm (cbqn): Update cbqn.
Update version.
Override 'generate-bytecode to rely on cbqn-bootstrap instead of dbqn.
Change-Id: I1660d218960e7395f4c10983d840e3fa4b451d14
-rw-r--r-- | gnu/packages/bqn.scm | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm index aca30f38b7..23c5253046 100644 --- a/gnu/packages/bqn.scm +++ b/gnu/packages/bqn.scm @@ -209,9 +209,16 @@ by APL.") (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 @@ by APL.") #+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))))) |