From patchwork Fri Aug 5 02:20:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Rodriguez X-Patchwork-Id: 41289 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E55A727BBEA; Fri, 5 Aug 2022 03:21:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6A00927BBE9 for ; Fri, 5 Aug 2022 03:21:50 +0100 (BST) Received: from localhost ([::1]:42344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJmyD-0001aT-0U for patchwork@mira.cbaines.net; Thu, 04 Aug 2022 22:21:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJmxV-00016j-Fu for guix-patches@gnu.org; Thu, 04 Aug 2022 22:21:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJmxV-0007lf-9S for guix-patches@gnu.org; Thu, 04 Aug 2022 22:21:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJmxV-0006NF-44 for guix-patches@gnu.org; Thu, 04 Aug 2022 22:21:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56993] [PATCH v1 5/5] gnu: bqn: Add cbqn. Resent-From: Christopher Rodriguez Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 Aug 2022 02:21:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56993 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56993@debbugs.gnu.org Cc: Christopher Rodriguez X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165966605924409 (code B ref -1); Fri, 05 Aug 2022 02:21:04 +0000 Received: (at submit) by debbugs.gnu.org; 5 Aug 2022 02:20:59 +0000 Received: from localhost ([127.0.0.1]:55520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJmxP-0006Ld-0i for submit@debbugs.gnu.org; Thu, 04 Aug 2022 22:20:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:57178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJmxM-0006LG-2J for submit@debbugs.gnu.org; Thu, 04 Aug 2022 22:20:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJmxL-00014w-TU for guix-patches@gnu.org; Thu, 04 Aug 2022 22:20:55 -0400 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:36535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJmxJ-0007kn-Vu for guix-patches@gnu.org; Thu, 04 Aug 2022 22:20:55 -0400 Received: by mail-qk1-x72e.google.com with SMTP id w6so1010524qkf.3 for ; Thu, 04 Aug 2022 19:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=WffWN0cGEBFA/pTnXz7UclLUNoa/rItGqPkfzyY+514=; b=BbFIUVCcEauwO8aF/ALTQQihM/oEiVhC+JoQyrh8SFIux/u6iuLDsrTY7kpL+b3S4l TnY4ZdPRs5dC/oAJIUcWLq4CAqCUgR3ymPBsT1Fm1T+uHyxgnwXjSjRy0irUE/N2TIks IGXzIj00j7OH8RkKs6X+SWIRXwhfCODgDPxuErC6gb5NXaVCdebr7zkKsNIyYTRVa0xM 5Je7hbcTj9Ayrk6mdotelkev60Byy16MdAmRpdYKoUqI70G9aDJX/yOQBRpNct7mT/ft rpiX9yVrucJdtY0/m0NXMmQwXV6bYXyuTPcqm8Fz9LW7lFl4k5+18YWXVPeG+lPGDTYS IFYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=WffWN0cGEBFA/pTnXz7UclLUNoa/rItGqPkfzyY+514=; b=kA8kv0I3r87k/a6EJ4Te1jMyNAYPwXK2lD9h//7i71YSRFWSze8/QA1cFYd5LwGgOH lr5zr+7OQwSACnKADhaqksatTMfHdZmvcJ0HIc58rGsHSjVAW12XWV3WSAnTxXTe33Dr 2tQimM5VKybLWou5fbxy7UiJ3YZmJdIsA+Z/sl7s0y8pzhz336lbsYy2aBp6f88GOG+n gdoJ04Ne/gk5woF8wUTnaXFwZMTTEUMO+ksxAVaL+x1IGpO30tUZGIjMlqDaMKX95vRc LNun1FC4EUo2IMkySgdLXg01FdGXFlYdvXI5v9MA7RH0kuWsk5r2ribYV7iEFcxDxphP lBDQ== X-Gm-Message-State: ACgBeo1fSZMHCNdMrM5hzsJC03sRiZGEq5BNibe63vBD9pLXmV1eI9uN 43pk0N8pzvau/EBO3lelnboADHPvA2LNrQ== X-Google-Smtp-Source: AA6agR5kYjJpov5DNyGf8pb4HF0OSRI6Czy2mx8djix5Pj/R16pkjiO8drsnFsSP1G1kiGNjEkKQ1Q== X-Received: by 2002:a05:620a:4627:b0:6b8:fd66:77e6 with SMTP id br39-20020a05620a462700b006b8fd6677e6mr3499238qkb.764.1659666052825; Thu, 04 Aug 2022 19:20:52 -0700 (PDT) Received: from gmail.com ([2601:547:a00:7720::7bb0]) by smtp.gmail.com with ESMTPSA id v18-20020a05620a0f1200b006b60f5f53ccsm2061606qkl.25.2022.08.04.19.20.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 19:20:52 -0700 (PDT) From: Christopher Rodriguez Date: Thu, 4 Aug 2022 22:20:23 -0400 Message-Id: <20220805022023.5044-5-yewscion@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220805022023.5044-1-yewscion@gmail.com> References: <20220805022023.5044-1-yewscion@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::72e; envelope-from=yewscion@gmail.com; helo=mail-qk1-x72e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- gnu/packages/bqn.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm index 3616067d87..cebf3acd13 100644 --- a/gnu/packages/bqn.scm +++ b/gnu/packages/bqn.scm @@ -206,3 +206,55 @@ (define singeli-bootstrap there are no plans to target GPUs.") (home-page "https://github.com/mlochbaum/Singeli") (license license:isc)))) +(define-public cbqn + (package + (inherit cbqn-bootstrap) + (name "cbqn") + (outputs '("out" "lib")) + (arguments + (list #:make-flags '(list "shared-o3" "o3n-singeli") + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'link-singeli + (lambda* (#:key inputs #:allow-other-keys) + (symlink (string-append #$(this-package-input + "singeli-bootstrap") + "/share/singeli") + "Singeli"))) + (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 'check + (lambda* (#:key inputs tests? #:allow-other-keys) + (when tests? + (map (lambda (x) + (system (string-append "./test/" x ".sh " + #$(this-package-input + "bqn-bytecode-sources") + "/share/"))) + '("mainCfgs" "x86Cfgs" "moreCfgs")) + (map (lambda (x) + (system (string-append "./BQN ./test/" x + ".bqn"))) + '("cmp" "equal" "copy" "bitcpy" "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) + (mkdir-p lib) + (chmod "BQN" 493) + (copy-recursively "BQN" + (string-append bin "/bqn")) + (install-file "libcbqn.so" lib))))))) + (inputs (list bqn-bytecode-sources libffi singeli-bootstrap))))