From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8P5hOw6v7GK2NQEAbAwnHQ (envelope-from ) for ; Fri, 05 Aug 2022 07:47:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cMMiOw6v7GJ4uQAAauVa8A (envelope-from ) for ; Fri, 05 Aug 2022 07:47:58 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 875EC3C4B6 for ; Fri, 5 Aug 2022 07:47:58 +0200 (CEST) Received: from localhost ([::1]:40546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJqBh-0003Kt-5z for larch@yhetil.org; Fri, 05 Aug 2022 01:47:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJqAo-0003Kl-PQ for guix-patches@gnu.org; Fri, 05 Aug 2022 01:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37767) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJqAo-0005mo-FQ for guix-patches@gnu.org; Fri, 05 Aug 2022 01:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJqAo-0003Wj-Ax for guix-patches@gnu.org; Fri, 05 Aug 2022 01:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56989] [PATCH v2] gnu: bqn: Add bqn.scm and dbqn package. References: <20220805022023.5044-1-yewscion@gmail.com> In-Reply-To: <20220805022023.5044-1-yewscion@gmail.com> Resent-From: Christopher Rodriguez Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 Aug 2022 05:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56989 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56989@debbugs.gnu.org Cc: Christopher Rodriguez Received: via spool by 56989-submit@debbugs.gnu.org id=B56989.165967839013519 (code B ref 56989); Fri, 05 Aug 2022 05:47:02 +0000 Received: (at 56989) by debbugs.gnu.org; 5 Aug 2022 05:46:30 +0000 Received: from localhost ([127.0.0.1]:55749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJqAI-0003Vy-0e for submit@debbugs.gnu.org; Fri, 05 Aug 2022 01:46:30 -0400 Received: from mail-qk1-f174.google.com ([209.85.222.174]:45647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJqAG-0003Vj-GA for 56989@debbugs.gnu.org; Fri, 05 Aug 2022 01:46:29 -0400 Received: by mail-qk1-f174.google.com with SMTP id m22so1179805qkm.12 for <56989@debbugs.gnu.org>; Thu, 04 Aug 2022 22:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=IUX7CDoWdpw9SO41JXWthlCQQHzVcQW6FLoaN40e4RE=; b=q1fo9XCdGkkvhrpCd0eZosh5mTydaQL2GNEe8on3/NCgs3bjXYNbAUyp4eMEB6S70b Pv/1FeQmoakC90MQuZomtK+f1n/CLioRPaY3zvv+8G0q7kdVYNzrfaBjEtJW6p2g2Hsp gW0Mi/Urc48gsIHjCy5Jzq35iSG5LMd5L5PCYnBJwq5Re/Eihky6Y7iPp5B2GcggIFLS DhaMYVdI7oBGgtBK6HjoDKksow5kZsXRnKci6ZSc2Kpa+0cw3euP/vLJR5s0kNKzBR0N 13NGWviyhMKNH0jleOuZ6GGSRBv7029UvG9A6gV4Bl6MAa+XS4MHrSqXw8EkFhAuXLBz 0k4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=IUX7CDoWdpw9SO41JXWthlCQQHzVcQW6FLoaN40e4RE=; b=Z7nYI7ySji5fmzw5I8uK+ZjgSW+QpY+qwm0lJIqdpAmMGdVJbi+IDaeGliXk7yHjqZ Q2QPR4l3PbMgbOiActgi2ZLSCGNVDfUGjLYm02GiS8UjvRjJVmKiw3ypjxBXmK0BlXyW Hg7GfsrwSv7lYF6/mNTqZzcxyYwc4uPZGRuuzpAtGB0hMt59zZb7rmxRJcFEsQloQkFt 9zsiyUHqw8QlNlOqPmxmo/OgURAtRRltGumbBRb5ZRFQRNm+/DNN1lOeMvlgAZ6D1eTZ gSupsWMQxj43j09vuT8pzgOChzNImARHjrWKYRluy5su1zqBDhzwT9PV+pWofFUi3MXL 5KYw== X-Gm-Message-State: ACgBeo1GIB28/tTZIMiuc01mHn1V3RuPvXvP519FIlwmDXr8WExXZfe9 huo9YHDo3T8NnPjwLdhiF8n1hgJZv45zRw== X-Google-Smtp-Source: AA6agR4GCwTKjIx5daoiYTX98xxeytGMqB1NcWWxzWBh2EG2Z7KKpM35v/mFkM8nZdOf0IkdgGRTFQ== X-Received: by 2002:a37:dcc7:0:b0:6b8:e3c2:3e3 with SMTP id v190-20020a37dcc7000000b006b8e3c203e3mr3756484qki.213.1659678382602; Thu, 04 Aug 2022 22:46:22 -0700 (PDT) Received: from gmail.com ([2601:547:a00:7720::7bb0]) by smtp.gmail.com with ESMTPSA id y5-20020a37f605000000b006b5f8f32a8fsm2119374qkj.114.2022.08.04.22.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 22:46:22 -0700 (PDT) From: Christopher Rodriguez Date: Fri, 5 Aug 2022 01:46:16 -0400 Message-Id: <20220805054616.30620-1-yewscion@gmail.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659678478; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=IUX7CDoWdpw9SO41JXWthlCQQHzVcQW6FLoaN40e4RE=; b=BaNMxRwbraMwol+ah2RneAdS+OKYFLsS0QQ7URvvPN73YydAayV+5QZYzu643gXasx5qGD zthB4lSL4kKRKUJdCVokfuvDxPXk53KfECz4Xuw+vWEjTiwzH5hJFzaIlnCGGeh3577qGF a9u41IEKhOtH3IZ81RgCwaCIG1d0rydPfdrMcR9dxwnqh/zzm+GxtU4F4g3/KE8gsA+Wcb mPacsvrqj5IFlRBRuRWWz4I2pvFsjXqC9uOVYMThjVGh+cttrq9MMl/VDQ63Pc+ToevnYT RHTpMEsE3qjh51030svLhZfLh5+710WKF4v8YbGwFz3VLAf/O3HgR6xIWSH/Rg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659678478; a=rsa-sha256; cv=none; b=BzRHrDg6yzRfwi3cvxKcPjCw2gcE9v1RiGPeWnHplRRYnvfkL+TXCfPOKDE+3GLuBPtB1P fav/iSJ2uVnwCirJ27CNL2et9N4g5LWlCoi9weaDuzMosyTB7OGRjA7HuXLTuvjLzZYtI9 l/HbfjftIrB5du33D+tQrb/C0sFKdIW4C4cFJ6Vlc6SOJC6NPReiD5PZbmfjjSk6b0Ud// luBGNBD7hKHOoSCDOh9jtVz1+CbTIoLFPoQx/g2BN9wpJ/DFHxOUr88ryI0BzrPn8Yt3tB pJFE3M5VIFYbecjkfzhFo+u5JfOfACFYPg8XbK5yiS8SiPIS9mr2NbHo3AiirQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=q1fo9XCd; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.79 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=q1fo9XCd; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 875EC3C4B6 X-Spam-Score: 6.79 X-Migadu-Scanner: scn0.migadu.com X-TUID: eXBChymUHnd3 Thanks to some help from upstream and on IRC (thanks, dzaima and lilyp!) I was able to remove the non-determinism issue. Here's an updated patch. --- gnu/packages/bqn.scm | 102 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 gnu/packages/bqn.scm diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm new file mode 100644 index 0000000000..261f29ece5 --- /dev/null +++ b/gnu/packages/bqn.scm @@ -0,0 +1,102 @@ +(define-module (gnu packages bqn) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix build-system copy) + #:use-module (guix build-system gnu) + #:use-module (guix utils) + #:use-module (guix deprecation) + #:use-module (gnu packages) + #:use-module (gnu packages libffi) + #:use-module (gnu packages base) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages llvm) + #:use-module (gnu packages java) + #:use-module (gnu packages compression)) +(define-public dbqn + (let* ((tag "0.2.1") + (revision "1") + (commit "0bbe096fc07d278b679a8479318f1722d096a03e") + (hash "1kxzxz2hrd1871281s4rsi569qk314aqfmng9pkqn8gv9nqhmph0") + (version (git-version tag revision commit))) + (package + (name "dbqn") + (version version) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dzaima/BQN") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + hash)))) + (outputs '("out")) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ;While there is a "test" directory, there is no + ;; mechanism to run the tests other than to feed the files into the + ;; binary and check for an error. This is outside the scope of a + ;; packaging workflow, and would need to be fixed upstream + ;; instead. Issue Reported: https://github.com/dzaima/BQN/issues/12 + ;; Maintainer says many of the tests fail, and so they will remain off + ;; until this is sorted out. + #: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) + #:prefix ant:) + (guix build utils)) + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* _ + (invoke "./build"))) + (add-after 'build 'strip-jar-timestamps + (lambda* (#:key outputs #:allow-other-keys) + (write %standard-phases))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (dest-bin (string-append out "/bin")) + (dest-jar (string-append out + "/share/java"))) + (mkdir-p dest-bin) + (mkdir-p dest-jar) + (copy-recursively "BQN" + (string-append dest-bin + "/dbqn")) + (chmod (string-append dest-bin "/dbqn") 493) + (install-file "BQN.jar" dest-jar)))) + (add-after 'install 'subjars + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (dest-bin (string-append out "/bin")) + (dest-jar (string-append out + "/share/java"))) + (substitute* (string-append dest-bin "/dbqn") + (("BQN.jar") + (string-append dest-jar "/BQN.jar")))))) + (add-after 'subjars 'reorder-jar-content + (lambda* (#:key outputs #:allow-other-keys) + (apply (cdr (assoc 'reorder-jar-content + ant:%standard-phases)) + #:outputs (list outputs)))) + (add-after 'reorder-jar-content 'jar-indices + (lambda* (#:key outputs #:allow-other-keys) + (apply (cdr (assoc 'generate-jar-indices + ant:%standard-phases)) + #:outputs (list outputs)))) + (add-after 'jar-indices 'fix-jar-timestamps + (lambda* (#:key outputs #:allow-other-keys) + (apply (cdr (assoc 'reorder-jar-content + ant:%standard-phases)) + #:outputs (list outputs))))))) + (native-inputs (list `(,openjdk17 "jdk") coreutils zip)) + (synopsis "BQN implementation based on dzaima/APL") + (description "BQN implementation based on dzaima/APL.") + (home-page "https://github.com/dzaima/BQN") + (license license:expat)))) base-commit: 116c0268ffd387c88b6b47135203fb330eb422f0 -- 2.37.1