guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/09: gnu: cbqn: Rewrite in terms of cbqn-bootstrap.


From: guix-commits
Subject: 04/09: gnu: cbqn: Rewrite in terms of cbqn-bootstrap.
Date: Mon, 7 Nov 2022 16:02:22 -0500 (EST)

lilyp pushed a commit to branch master
in repository guix.

commit 95c494e298f565e609f6c08621e1a293a385b3d1
Author: Liliana Marie Prikler <liliana.prikler@gmail.com>
AuthorDate: Sat Oct 22 20:34:37 2022 +0200

    gnu: cbqn: Rewrite in terms of cbqn-bootstrap.
    
    * gnu/packages/bqn.scm (cbqn)[arguments]: Use substitute-keyword-arguments
    to preserve options from cbqn-bootstrap.
---
 gnu/packages/bqn.scm | 59 +++++++++++++++++++++++++---------------------------
 1 file changed, 28 insertions(+), 31 deletions(-)

diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index 8a1b1dfba2..bc714c3d49 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -171,37 +171,34 @@ by APL.")
     (name "cbqn")
     (outputs '("out" "lib"))
     (arguments
-     (list #:make-flags '(list "shared-o3" "o3")
-           #: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 '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)))))))
+     (substitute-keyword-arguments (strip-keyword-arguments
+                                    (list #:tests?)
+                                    (package-arguments cbqn-bootstrap))
+       ((#:make-flags flags #~(list))
+        #~(cons* "shared-o3" "o3" #$flags))
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            (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
                          libffi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]