unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: 58100@debbugs.gnu.org
Cc: Christopher Rodriguez <yewscion@gmail.com>
Subject: [bug#58100] [PATCH v2 4/8] gnu: cbqn: Rewrite in terms of cbqn-bootstrap.
Date: Sat, 22 Oct 2022 20:34:37 +0200	[thread overview]
Message-ID: <69d947544bdbcec3c1eb06ff349c7b467b5b759b.camel@gmail.com> (raw)
In-Reply-To: <878rm6hs4d.fsf@gmail.com>

* 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 @@ (define-public cbqn
     (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
-- 
2.38.0





  parent reply	other threads:[~2022-10-24  4:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 19:03 [bug#58100] cbqn currently targets AVX2 Christopher Rodriguez
2022-09-26 19:12 ` [bug#58100] [PATCH] gnu: cbqn: factor out singeli into derivative package Christopher Rodriguez
2022-09-26 19:17   ` Christopher Rodriguez
2022-09-27  7:26   ` Liliana Marie Prikler
2022-09-27 17:27     ` Christopher Rodriguez
2022-09-28  7:41       ` Liliana Marie Prikler
2022-10-22 18:23 ` [bug#58100] [PATCH v2 1/8] cbqn: Build without singeli Liliana Marie Prikler
2022-11-06 17:39   ` [bug#58100] cbqn currently targets AVX2 Ludovic Courtès
2022-11-06 18:25     ` Liliana Marie Prikler
2022-11-07 13:35       ` Ludovic Courtès
2022-11-07 21:03         ` bug#58100: " Liliana Marie Prikler
2022-10-22 18:25 ` [bug#58100] [PATCH v2 2/8] gnu: Remove singeli-sources Liliana Marie Prikler
2022-10-22 18:28 ` [bug#58100] [PATCH v2 3/8] gnu: cbqn-bootstrap: Use let-bound revision Liliana Marie Prikler
2022-10-22 18:34 ` Liliana Marie Prikler [this message]
2022-10-22 18:43 ` [bug#58100] [PATCH v2 5/8] gnu: cbqn: Build using GCC Liliana Marie Prikler
2022-10-22 18:59 ` [bug#58100] [PATCH v2 6/8] gnu: dbqn: Install regular files rather than copying them recursively Liliana Marie Prikler
2022-10-22 19:01 ` [bug#58100] [PATCH v2 8/8] gnu: cbqn: " Liliana Marie Prikler
2022-10-22 19:01 ` [bug#58100] [PATCH v2 7/8] gnu: cbqn-bootstrap: " Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69d947544bdbcec3c1eb06ff349c7b467b5b759b.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=58100@debbugs.gnu.org \
    --cc=yewscion@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).