From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 mKi4AZh+7GIp+wAAbAwnHQ (envelope-from ) for ; Fri, 05 Aug 2022 04:21:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2OrHAZh+7GIWSwAA9RJhRA (envelope-from ) for ; Fri, 05 Aug 2022 04:21:12 +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 C1D4838622 for ; Fri, 5 Aug 2022 04:21:11 +0200 (CEST) Received: from localhost ([::1]:41638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJmxa-00015h-RI for larch@yhetil.org; Thu, 04 Aug 2022 22:21:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJmxT-00015I-6N for guix-patches@gnu.org; Thu, 04 Aug 2022 22:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJmxS-0007lE-W4 for guix-patches@gnu.org; Thu, 04 Aug 2022 22:21:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJmxS-0006MI-Ku for guix-patches@gnu.org; Thu, 04 Aug 2022 22:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56989] [PATCH v1 1/5] gnu: bqn: Add bqn.scm and dbqn package. Resent-From: Christopher Rodriguez Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 Aug 2022 02:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56989 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56989@debbugs.gnu.org Cc: Christopher Rodriguez X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165966603624332 (code B ref -1); Fri, 05 Aug 2022 02:21:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Aug 2022 02:20:36 +0000 Received: from localhost ([127.0.0.1]:55508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJmx2-0006KO-9R for submit@debbugs.gnu.org; Thu, 04 Aug 2022 22:20:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:57140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJmwz-0006KE-C2 for submit@debbugs.gnu.org; Thu, 04 Aug 2022 22:20:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJmwz-00011Q-4C for guix-patches@gnu.org; Thu, 04 Aug 2022 22:20:33 -0400 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]:39858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJmwx-0007hQ-9Q for guix-patches@gnu.org; Thu, 04 Aug 2022 22:20:32 -0400 Received: by mail-qk1-x72c.google.com with SMTP id m7so996995qkk.6 for ; Thu, 04 Aug 2022 19:20:30 -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=AkfLc2XC8kVdmdxF8aD/1LQbVfONG3JeJFV9zeTzfXU=; b=dFwynUIv6xlhDixqioBw3Wn1mWPqtqvXvbJ8/4hFwOWNMcEy/PAQNygbQeZEaTArkM 2r94mkMOcup/PEXnnJbVANt62+RRcwtYV0KZonHXsC68aigzmiHyOxK+X0UKE1nip1Jl 71Eli31NE5X+iidgmrp2n/LDrepIAYUNtbFYnfjt6GO/xYVXwOJePklyJ6vqi+Vml2p+ y3JVJHDH/di+L5gY+YY5PzME+5wI61Ri58QXyP+VSV/6LZekPOQhtZmBNKzEqFBIiWh9 JVeZoL2fRSVbQC2FW+bYxZzA0CoH++xIPPqx/s+Rq7WXFFUVi3uYCGDUb6eQuClBKEIl Xs9g== 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=AkfLc2XC8kVdmdxF8aD/1LQbVfONG3JeJFV9zeTzfXU=; b=JNR77PBql/rASD8QGoCecDMeUEs6CcxaWBghdlRUem6xgMWWr4IYJoeX1YEvKjO9BV VBg95XRzRhZIit5mt/CGHJrz9BqG4l1uo3iomWRNsz8i3cXOwHiO59nJbKYlRXnr1Ai1 RnQvHhah6cMjbkDVew4VG1OyIKdOXz4O5uHwOWUEPycGNj+vU0KV0UOQSSJ0vq+VCegg Tg3WjwFi17d+W4HYw4TdFB+SGoNY3wHQ2GLWew8R5ANn0izKDVAMqIlPbKxHKOvez4DP PcygUEjkzZONEECWCHP07rheQ3JUrpcf2BrGUwhMiV8fgCCr5cBSyJ0vAeRHPPmdh5G/ Wg7g== X-Gm-Message-State: ACgBeo0du/diw3gvf5EhzU+HPP36/03ZJXuvTuACOp4nTVe+IMD3wLjt ehsKQay6e7PSSfJEcqB3G3i3LtP7zNCp4g== X-Google-Smtp-Source: AA6agR4yUSnPf8aSJnCmuRXg2xpavVerV6Rthp7WmKlvj60E/RasxkA+nso9Iz+GKKPSrP9jtX2eHA== X-Received: by 2002:a05:620a:24d4:b0:6b6:2fb2:428d with SMTP id m20-20020a05620a24d400b006b62fb2428dmr3596275qkn.206.1659666029385; Thu, 04 Aug 2022 19:20:29 -0700 (PDT) Received: from gmail.com ([2601:547:a00:7720::7bb0]) by smtp.gmail.com with ESMTPSA id bk4-20020a05620a1a0400b006b89a19a32dsm1897877qkb.69.2022.08.04.19.20.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 19:20:29 -0700 (PDT) From: Christopher Rodriguez Date: Thu, 4 Aug 2022 22:20:19 -0400 Message-Id: <20220805022023.5044-1-yewscion@gmail.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::72c; envelope-from=yewscion@gmail.com; helo=mail-qk1-x72c.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+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=1659666071; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=AkfLc2XC8kVdmdxF8aD/1LQbVfONG3JeJFV9zeTzfXU=; b=oYjrzeYu131ut3srmfdo0VVbo2gf6IA7uOb6VrNltNm+rjcG4kPjLAYtrVNOde98KNH79e VSTLQRgLVpCFn8n3OaFB7I8ifG7dVpauVmB8SVXAMG1bhctPkcE8nYvuuo6T6cC8AMcUbD Mzksmslj9q0Lb8CC7MIFPoKW1glMlwROa261ivs+s2YkzZPlWU5x/u8oFRnMKbIHGHSLiP 19Lmk+DIi7oulG5VZ5Q9k2IjD1i1zkeZMLqc8BZIjhteoqh/+ypsW59l06aNHK1gP4jRee fdBx0NZkCXcssBOPwp/wCPkXienL3El7fCkQeO+rx/M6hAxH6P5yGWEz3dD9pQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659666071; a=rsa-sha256; cv=none; b=bW4+CnmZZ3QEhLbmExegy5vWBGU4+nVxGfcsWoz4tZHVaYRiLMIcNIGgN4seob78QI6hDQ PONVCC9PKDHVxLF/TTNHRKGX9New1fQxP2r7s5YitZcBypLof6OA4TSbkgkjT9hnPM6H4K syAxyWVVo4sIgEBfxsSMdCLMnL7mc3wn5cTiOf2Xfi6OzwCbjxZI3ClaczDgHU23NOwX1A jLkjlwu7Zjr/sF3c9hNYxEZEDyG8agJwuHdNwFWbhWgmmPPY1untCL7OebjaRkfFzSEoNQ 7iYV74s77WGYCnddlgzgwYm8GkVX/dpkLKFq4STLBNwEiDy+TO9Sf8x66+Uw1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dFwynUIv; 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.89 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dFwynUIv; 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: C1D4838622 X-Spam-Score: 6.89 X-Migadu-Scanner: scn1.migadu.com X-TUID: sTMmBfuvr+MX Hello all, This is a set of patches to add CBQN (and the packages required to build it from source) to the official Guix repository. CBQN is the recommended implementation of the BQN language, which is a new array programming language in the same vein as APL, K, Q, J, Dyalog APL, etc. Even better than most of those, it carries a FSDG compatible license (the implementation is even under single-license GPL!) and so I feel as though it should definitely be a part of GNU Guix. While there are still a few outstanding issues I hope to address with those upstream eventually (all documented in the comments), I believe I have followed the guidelines in the manual. Please let me know what I can improve, and how I might expedite this awesome language's inclusion in GNU Guix. --- gnu/packages/bqn.scm | 92 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 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..53e2f0a057 --- /dev/null +++ b/gnu/packages/bqn.scm @@ -0,0 +1,92 @@ +(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)) + +;; Currently this package is non-deterministic due to random generation in +;; some of the primitives. This is marked as a TODO in the source code, but +;; per the maintainer this package almost solely exists for the purpose of +;; building CBQN at this point, and therefore is not a high priority. Git +;; reports this here: +;; +;; src/BQN/types/callable/builtins/fns/EpsBuiltin.java:45:71: +;; … // TODO these (and in ⊐) shouldn't be random numbers +;; +;; Reported Upstream Here: https://github.com/dzaima/BQN/issues/14 +;; +;; This issue therefore means that none of the packages for bqn can be checked +;; for non-determinism at this time, as dbqn is a prerequisite for all of +;; them. +(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. + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* _ + (invoke "./build"))) + (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"))))))))) + (native-inputs (list `(,openjdk17 "jdk") + coreutils)) + (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