gnu: bqn-sources: Update to commit 71ce3614...
[jackhill/guix/guix.git] / gnu / packages / bqn.scm
index bc714c3..58e27b8 100644 (file)
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2022 Christopher Rodriguez <yewscion@gmail.com>
+;;; Copyright © 2022 Liliana Marie Prikler <liliana.prikler@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -54,7 +55,6 @@
       (arguments
        (list
         #:imported-modules `(,@%gnu-build-system-modules
-                             (guix build syscalls)
                              (guix build ant-build-system))
         #:modules `((guix build gnu-build-system)
                     ((guix build ant-build-system)
@@ -92,9 +92,8 @@
                                 (dest-jar (string-append out "/share/java")))
                            (mkdir-p dest-bin)
                            (mkdir-p dest-jar)
-                           (copy-recursively "BQN"
-                                             (string-append dest-bin
-                                                            "/dbqn"))
+                           (rename-file "BQN" "dbqn")
+                           (install-file "dbqn" dest-bin)
                            (install-file "BQN.jar" dest-jar)
                            (substitute* (string-append dest-bin "/dbqn")
                              (("BQN.jar")
@@ -114,7 +113,7 @@ the same author.")
   ;; Aside from dbqn above, the main bqn repository is used by other
   ;; implementations as a "known good" set of sources. CBQN uses dbqn to
   ;; generate an intermediate bytecode for its own compilation.
-    (let ((commit "e219af48401473a7bac49bdd8b89d69082cf5dd8"))
+    (let ((commit "71ce36141aaacfa714edca2e408ca522a3bc5554"))
       (origin
         (method git-fetch)
         (uri (git-reference
@@ -122,7 +121,7 @@ the same author.")
               (commit commit)))
         (file-name (git-file-name "bqn-sources" commit))
         (sha256
-         (base32 "0r6pa9lscl2395g4xlvmg90vpdsjzhin4f1r0s7brymmpvmns2yc")))))
+         (base32 "060a3r5m7hynzxj4iz1av2kj5jf8w3j8yswzzx9wkx31rdrsiv2c")))))
 
 (define cbqn-bootstrap
   (let* ((revision "1")
@@ -141,22 +140,24 @@ the same author.")
                   "0w38fhwf20drkyijy6nfnhmc5g5gw0zmzgmy1q605x57znlj85a2"))))
       (build-system gnu-build-system)
       (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 #+dbqn
-                                                     "/bin/dbqn ./genRuntime "
-                                                     #+bqn-sources))))
-                          (replace 'install
-                            (lambda* (#:key outputs #:allow-other-keys)
-                              (mkdir-p (string-append #$output "/bin"))
-                              (chmod "BQN" #o755)
-                              (copy-recursively "BQN"
-                                                (string-append #$output
-                                                               "/bin/bqn")))))))
-      (native-inputs (list dbqn clang-toolchain bqn-sources))
+       (list
+        #:tests? #f                     ; skipping tests for bootstrap
+        #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
+        #: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 'install
+              (lambda* (#:key outputs #:allow-other-keys)
+                (mkdir-p (string-append #$output "/bin"))
+                (chmod "BQN" #o755)
+                (rename-file "BQN" "bqn")
+                (install-file "bqn" (string-append #$output "/bin")))))))
+      (native-inputs (list dbqn bqn-sources))
       (inputs (list icedtea-8 libffi))
       (synopsis "BQN implementation in C")
       (description "This package provides the reference implementation of
@@ -196,11 +197,12 @@ by APL.")
                        (lib (string-append (assoc-ref outputs "lib")
                                            "/lib")))
                   (mkdir-p bin)
-                  (copy-recursively "BQN"
-                                    (string-append bin "/bqn"))
+                  (rename-file "BQN" "bqn")
+                  (install-file "bqn" bin)
                   (install-file "libcbqn.so" lib))))))))
     (native-inputs (list dbqn
                          bqn-sources
                          libffi
-                         clang-toolchain
-                         linux-libre-headers))))
+                         linux-libre-headers))
+    (properties
+     `((tunable? . #t)))))