From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 eCn4EAPE7GIV0gAAbAwnHQ (envelope-from ) for ; Fri, 05 Aug 2022 09:17:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kFv1DwPE7GIl+gAAG6o9tA (envelope-from ) for ; Fri, 05 Aug 2022 09:17:23 +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 C58943E530 for ; Fri, 5 Aug 2022 09:17:22 +0200 (CEST) Received: from localhost ([::1]:59802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJraD-00066b-Ol for larch@yhetil.org; Fri, 05 Aug 2022 03:17:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJrZu-00065e-T4 for guix-patches@gnu.org; Fri, 05 Aug 2022 03:17:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJrZu-0003iR-Au for guix-patches@gnu.org; Fri, 05 Aug 2022 03:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJrZu-0001vM-5X for guix-patches@gnu.org; Fri, 05 Aug 2022 03:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56989] [PATCH v2] gnu: bqn: Add bqn.scm and dbqn package. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 05 Aug 2022 07:17: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: Christopher Rodriguez , 56989@debbugs.gnu.org Cc: control@debbugs.gnu.org Received: via spool by 56989-submit@debbugs.gnu.org id=B56989.16596837667318 (code B ref 56989); Fri, 05 Aug 2022 07:17:02 +0000 Received: (at 56989) by debbugs.gnu.org; 5 Aug 2022 07:16:06 +0000 Received: from localhost ([127.0.0.1]:55981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJrYz-0001tx-L8 for submit@debbugs.gnu.org; Fri, 05 Aug 2022 03:16:06 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:1071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJrYt-0001t8-LN; Fri, 05 Aug 2022 03:16:03 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4LzcMF4HWkz1LXt0; Fri, 5 Aug 2022 09:15:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4LzcMF4HWkz1LXt0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1659683754; bh=rnG4PBMsdlXDXd44cQmQDWSyFfJ5M8qELxKCMCO5DdM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=eFIj+cBNt7iqEuAuEs462PfNSPGo32JfFD+aAzPDw89OyjVEJzQA200QLMmyEuyzg Mdl3T3zQ8S78gbCjXdi8rDLWQIdAYTWf2DmjklBVmGUVL9D4SJjlqoFtKf2xoQxrLS vOYvs/LZnFH9+4oAigREJLhSSmiwm6zMKT4B2WME= Message-ID: <7742c07ce28494af40c74262277417e60fe6f500.camel@ist.tugraz.at> From: Liliana Marie Prikler Date: Fri, 05 Aug 2022 09:15:52 +0200 In-Reply-To: <20220805054616.30620-1-yewscion@gmail.com> References: <20220805054616.30620-1-yewscion@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 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=1659683843; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=rnG4PBMsdlXDXd44cQmQDWSyFfJ5M8qELxKCMCO5DdM=; b=PSW+gMuT6qXdUpjcyk6pyc/OdfxgkrxbiJAsnP1bkSlbu5kHoQhcfa2Sx7vbqBAAzHbHTh hWdtQUNy0hHOIiut7mH/qX31QTKy5+OAfqy87KnxMiNWwWzmRigQjsHrE3Nsxczuks13FW HTN6GaActJbM/7ZJnL9YBA+sJ06tT1dTQMbPqOQfK4oPPNqi1GlFQdQarr5K9Wv/eRBHJ2 IInY5+75pKRlRQ7rB9x1+Jmg8UVul2yt9EfpWcTnGC/BLxjuGLI3KoYp9h39oXLGaAiKJI X9BRqBMJNgSgr/wyaCbTcQZcacbaEQ7xZaxO0moujoCTO1smBd9PdMMDZyDD8w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659683843; a=rsa-sha256; cv=none; b=gU4EvjsQwDgLxNNAXRfAiVw+uqZlgmihD/F3RLnQ3nJYFq7CuSSdUeFRmYIP5rMFxydxqk +U88tYMUN82l5MEN+7MHVuWVemjbDPE45jeq/l+J0juLmluSaQ7yJrOKwpti/Aw4QKfcka 5zzRAm8r5GQglLGOqaCmN4e25poM05ZrcQMUVEuSUA1wVH5dLziIcfORB8OXHqWSpyW0uI M2Z5KsHzPbsPUGpL7poRSdXcNesU5SsijYDY9RLuL1tLhO3fwKAUjBF1KQBV1lxwrDlQwm cz0G+stSrgnS6bhGVeDM0s7r2PWcDDZy7gj0qFDedQ29yBO+GLkXL0zir2ktJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=eFIj+cBN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (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: 5.29 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=eFIj+cBN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (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: C58943E530 X-Spam-Score: 5.29 X-Migadu-Scanner: scn0.migadu.com X-TUID: dtcqnZQUPDgk merge 56989 56990 56991 56992 56993 thanks Regarding the patch title, just one level of grouping is enough. That is, use "gnu: Add dbqn." Also, you're missing a ChangeLog, i.e. * gnu/packages/bqn.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Register it here. Note that the second change is lacking from your patch. Am Freitag, dem 05.08.2022 um 01:46 -0400 schrieb Christopher Rodriguez: > 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))) Don't let-bind tag, version and hash, use them inline. > +    (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)) Note that version will be bound here even if you use the version field to do so. > +                (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. You could do (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (for-each (lambda (known-good-test) (invoke my-glorious-bin known-good-test)) known-good-tests)))) FSVO my-glorious-bin and known-good-tests. > +             #: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")))))) Could this be done in/before install? > +                          (add-after 'subjars 'reorder-jar-content > +                            (lambda* (#:key outputs #:allow-other- > keys) > +                              (apply (cdr (assoc 'reorder-jar- > content > +                                                 ant:%standard- > phases)) > +                                     #:outputs (list outputs)))) You can use #:rest args to bind args for apply. Also use assoc-ref rather than cdr + assoc. > +                          (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)) Is OpenJDK 17 required? > +      (synopsis "BQN implementation based on dzaima/APL") > +      (description "BQN implementation based on dzaima/APL.") > +      (home-page "https://github.com/dzaima/BQN") > +      (license license:expat)))) Cheers