From patchwork Tue Aug 30 16:49:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Sockwell X-Patchwork-Id: 42079 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 CC1D227BBEA; Tue, 30 Aug 2022 18:35:04 +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_INVALID, DKIM_SIGNED,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 DE28627BBE9 for ; Tue, 30 Aug 2022 18:35:02 +0100 (BST) Received: from localhost ([::1]:53828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oT58f-0000n8-Sg for patchwork@mira.cbaines.net; Tue, 30 Aug 2022 13:35:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT4S6-0002vp-Sg for guix-patches@gnu.org; Tue, 30 Aug 2022 12:51:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oT4S6-0008Er-JB for guix-patches@gnu.org; Tue, 30 Aug 2022 12:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oT4S6-0008El-F4 for guix-patches@gnu.org; Tue, 30 Aug 2022 12:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57491] [PATCH] patch series: Update Raku ecosystem Resent-From: "Daniel Sockwell" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 30 Aug 2022 16:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57491 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57491@debbugs.gnu.org Received: via spool by 57491-submit@debbugs.gnu.org id=B57491.166187820631579 (code B ref 57491); Tue, 30 Aug 2022 16:51:02 +0000 Received: (at 57491) by debbugs.gnu.org; 30 Aug 2022 16:50:06 +0000 Received: from localhost ([127.0.0.1]:37338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oT4RB-0008DF-B5 for submit@debbugs.gnu.org; Tue, 30 Aug 2022 12:50:06 -0400 Received: from out1.migadu.com ([91.121.223.63]:51295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oT4R4-0008Cf-RJ for 57491@debbugs.gnu.org; Tue, 30 Aug 2022 12:50:04 -0400 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codesections.com; s=key1; t=1661878197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8+eRYKNJqumUhn8TMsw892IsuzNH8WbkRgZzS/stp4o=; b=atwMvK8JidjCoXVdRTCpdFQrgJj0uPpWk+q/M52g7mvVTKrhfsZvF33b98Twq2UHJdr9C8 n2IxdZlBoqQOBLy84+SXGOStvduQeeLWJgO5bEIgpFuOmruI5xNTBz73AC5V0ITaWMhtW1 sIHuj9JinmE9FEIy/x59QSm0nQ7QWiqYOzm3FBpmtyOoC9LdNFENA3kwCwzt0XL+WxAlP8 AHHYxiXzJnFfeRcdK/A9psuN30Cvn7hPBS08YccyQ9Z2RYhIuI6f7LffdZVumzYOhegpZ0 Ek5OIYY6vzV9D1ptRMTRiiau+TASach2gtY5wWesYBKoxfknchNJC+SklHdaeg== Date: Tue, 30 Aug 2022 16:49:57 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. Message-ID: <209b7ee5a4550c6de4495ef66584f718@codesections.com> In-Reply-To: References: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: codesections.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Tue, 30 Aug 2022 13:23:29 -0400 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" Reply-to: Daniel Sockwell X-ACL-Warn: , Daniel Sockwell via Guix-patches X-Patchwork-Original-From: Daniel Sockwell via Guix-patches via From: Daniel Sockwell X-getmail-retrieved-from-mailbox: Patches The third patch in this series updates NQP, the sub-language that the Raku compiler depends on. Best, Daniel From 924cc46a38b103906d534e9554fca9499315e12c Mon Sep 17 00:00:00 2001 Message-Id: <924cc46a38b103906d534e9554fca9499315e12c.1661878022.git.daniel@codesections.com> From: Daniel Sockwell Date: Tue, 30 Aug 2022 12:46:51 -0400 Subject: [PATCH] nqp 2019.03->2022.07 --- .../nqp.do-not-pull-files-via-git.patch | 26 +++++++ gnu/packages/perl6.scm | 73 +++++++++---------- 2 files changed, 61 insertions(+), 38 deletions(-) create mode 100644 gnu/packages/patches/nqp.do-not-pull-files-via-git.patch diff --git a/gnu/packages/patches/nqp.do-not-pull-files-via-git.patch b/gnu/packages/patches/nqp.do-not-pull-files-via-git.patch new file mode 100644 index 0000000000..b99919286f --- /dev/null +++ b/gnu/packages/patches/nqp.do-not-pull-files-via-git.patch @@ -0,0 +1,26 @@ +# Don't fetch nqp-configure from git (Guix supplies it as an input) +diff --git a/Configure.pl b/Configure.patched.pl +index ded227d..1fd59c8 100755 +--- a/Configure.pl ++++ b/Configure.patched.pl +@@ -11,20 +11,6 @@ use File::Spec; + use File::Path; + use FindBin; + +-BEGIN { +- # Download / Update submodules +- my $set_config = !qx{git config nqp.initialized}; +- if ( !-e '3rdparty/nqp-configure/LICENSE' ) { +- my $code = system($^X, 'tools/build/update-submodules.pl', Cwd::cwd(), @ARGV); +- exit 1 if $code >> 8 != 0; +- $set_config = 1; +- } +- if ($set_config) { +- system("git config submodule.recurse true"); +- system("git config nqp.initialized 1"); +- } +-} +- + use lib ( "$FindBin::Bin/tools/lib", + "$FindBin::Bin/3rdparty/nqp-configure/lib", ); + use NQP::Config qw; diff --git a/gnu/packages/perl6.scm b/gnu/packages/perl6.scm index 086fc9d2e2..5f43cd59aa 100644 --- a/gnu/packages/perl6.scm +++ b/gnu/packages/perl6.scm @@ -26,6 +26,7 @@ (define-module (gnu packages perl6) #:use-module (guix build-system copy) #:use-module (guix build-system perl) #:use-module (guix build-system rakudo) + #:use-module (gnu packages) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) @@ -126,19 +127,20 @@ (define-public nqp-configure (define-public nqp (package (name "nqp") - (version "2019.03") + (version "2022.07") (source - (origin - (method url-fetch) - (uri (string-append "https://rakudo.perl6.org/downloads/nqp/nqp-" - version ".tar.gz")) - (sha256 - (base32 - "183zhll13fx416s3hkg4bkvib77kyr857h0nydgrl643fpacxp83")) - (modules '((guix build utils))) + (origin + (method url-fetch) + (uri (string-append + "https://github.com/Raku/nqp/releases/download/2022.07/nqp-" + version ".tar.gz")) + + (sha256 (base32 "0s124fl2kjahbhr52n92pw9gv1flr099kmlg04358ak7dl81q22q")) + (patches (search-patches "nqp.do-not-pull-files-via-git.patch")) + (modules '((guix build utils))) (snippet '(begin - (delete-file-recursively "3rdparty") #t)))) + (delete-file-recursively "3rdparty"))))) (build-system perl-build-system) (arguments '(#:phases @@ -149,42 +151,37 @@ (define-public nqp "tools/build/gen-js-cross-runner.pl" "tools/build/gen-js-runner.pl" "tools/build/install-js-runner.pl" - "tools/build/install-moar-runner.pl" - "tools/build/gen-moar-runner.pl" "t/nqp/111-spawnprocasync.t" "t/nqp/113-run-command.t") - (("/bin/sh") (which "sh"))) - #t)) - (add-after 'unpack 'patch-source-date - (lambda _ - (substitute* "tools/build/gen-version.pl" - (("gmtime") "gmtime(0)")) - #t)) - (add-after 'unpack 'remove-failing-test - ;; One subtest fails for unknown reasons - (lambda _ - (delete-file "t/nqp/019-file-ops.t") - #t)) + (("/bin/sh") (which "sh"))))) (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (moar (assoc-ref inputs "moarvm"))) + (let ((out (assoc-ref outputs "out")) + (moar (assoc-ref inputs "moarvm")) + (nqp-config (assoc-ref inputs "nqp-configure"))) + (setenv "PERL5LIB" (string-append + nqp-config "/lib:" (or (getenv "PERL5LIB") + ""))) + ; MoarVM has some M_AST files that NQP expects to share + (copy-recursively (string-append moar "/share/nqp/lib") + (string-append out "/share/nqp/lib")) (invoke "perl" "Configure.pl" "--backends=moar" "--with-moar" (string-append moar "/bin/moar") "--prefix" out))))))) - (inputs - (list moarvm)) - (home-page "https://github.com/perl6/nqp") - (synopsis "Not Quite Perl") - (description "This is \"Not Quite Perl\" -- a lightweight Perl 6-like -environment for virtual machines. The key feature of NQP is that it's designed -to be a very small environment (as compared with, say, perl6 or Rakudo) and is -focused on being a high-level way to create compilers and libraries for virtual -machines like MoarVM, the JVM, and others. - -Unlike a full-fledged implementation of Perl 6, NQP strives to have as small a -runtime footprint as it can, while still providing a Perl 6 object model and + + (inputs (list moarvm)) + (native-inputs (list nqp-configure)) + (home-page "https://github.com/Raku/nqp") + (synopsis "Small programming language built for writing compilers and VMs") + (description "NQP is \"Not Quite Perl\", a lightweight Raku-like programming +language that's designed to provide a high-level way to create compilers and +libraries for virtual machines. NQP is used to implement the Rakudo compiler +and to integrate Rakudo with various virtual machines, including MoarVM and the +Java Virtual Machine. + +Unlike a full-fledged implementation of Raku, NQP strives to have as small a +runtime footprint as it can while still providing Raku's object model and regular expression engine for the virtual machine.") (license license:artistic2.0)))