From patchwork Tue Aug 30 16:59:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Sockwell X-Patchwork-Id: 42081 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 F200427BBEA; Tue, 30 Aug 2022 18:57:25 +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 DCEF227BBE9 for ; Tue, 30 Aug 2022 18:57:24 +0100 (BST) Received: from localhost ([::1]:51824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oT5UK-0008HR-0L for patchwork@mira.cbaines.net; Tue, 30 Aug 2022 13:57:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT4ao-0005K8-Fm for guix-patches@gnu.org; Tue, 30 Aug 2022 13:00:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oT4ao-0001Ai-4r for guix-patches@gnu.org; Tue, 30 Aug 2022 13:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oT4an-0008TH-VU for guix-patches@gnu.org; Tue, 30 Aug 2022 13:00:01 -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 17:00:01 +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.166187874832443 (code B ref 57491); Tue, 30 Aug 2022 17:00:01 +0000 Received: (at 57491) by debbugs.gnu.org; 30 Aug 2022 16:59:08 +0000 Received: from localhost ([127.0.0.1]:37352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oT4Zv-0008RD-UU for submit@debbugs.gnu.org; Tue, 30 Aug 2022 12:59:08 -0400 Received: from out1.migadu.com ([91.121.223.63]:57663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oT4Zp-0008Qj-QT for 57491@debbugs.gnu.org; Tue, 30 Aug 2022 12:59:05 -0400 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codesections.com; s=key1; t=1661878740; 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=krak3rHxVVJahmw/t43U1EDdSCfudOCPR8+9f7bwETU=; b=l3BrggMPLtn+OeE9xQ1Nc/+lkh8RdC8J0aFXdtgVXOaLE013hSy9jhSG7cWDi6AGnnv59U MyTIMBPpwViO4TEqqt5DwtJkc+bU5mnkrJejVQq0O8XPcvb7S3h7kmgcHelC54il3Rj+kT hnOjUUoVxEWn2QYujg1tx5I8/5fbg2GvJ3M+WMfHeDysMFROclKWiNHARbDugbBtyatuFD 3RjPnMfCa944Bv7YHSgnwsdaZZV+c+YtcwFZS1gl3PbpysVaTG6uD7NWEumTc4JR1LM+2y 9yeRrdmVccacPLFUHJvxXWfwRXafOiOW+K/wmq41ob+9nNwZ5qlbnjYkslz//A== Date: Tue, 30 Aug 2022 16:59:00 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. Message-ID: <2dfb67c93f7d2cfabf26c89298c7386d@codesections.com> In-Reply-To: <209b7ee5a4550c6de4495ef66584f718@codesections.com> References: <209b7ee5a4550c6de4495ef66584f718@codesections.com> 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 fourth (and, for now, last) patch in this series updates Rakudo, the primary Raku compiler. Finally, I also want to note that one of the major changes in the Raku ecosystem in the last few years is Raku's name: Raku was previously known as "Perl 6" and the Guix module name refers to by that old name. I'm not sure if there's any way to update Guix's name (or add an alias?) without breaking things. But I wanted to bring the issue to the attention of people who might know the best way to proceed. I look forward to any feedback you might have and/or to being able to `guix install` an up-to-date version of Raku soon! Best, Daniel From fcdc70a2ec483c6f1abe0c6230ad0aa9a29a2443 Mon Sep 17 00:00:00 2001 Message-Id: From: Daniel Sockwell Date: Tue, 30 Aug 2022 12:58:09 -0400 Subject: [PATCH] rakudo 2019.03->2022.07 --- .../rakudo.do-not-pull-files-via-git.patch | 26 +++++ gnu/packages/perl6.scm | 98 ++++++++++++------- 2 files changed, 88 insertions(+), 36 deletions(-) create mode 100644 gnu/packages/patches/rakudo.do-not-pull-files-via-git.patch diff --git a/gnu/packages/patches/rakudo.do-not-pull-files-via-git.patch b/gnu/packages/patches/rakudo.do-not-pull-files-via-git.patch new file mode 100644 index 0000000000..4edf67dd0d --- /dev/null +++ b/gnu/packages/patches/rakudo.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.after.pl +index b315704..e4e3668 100755 +--- a/Configure.pl ++++ b/Configure.after.pl +@@ -11,20 +11,6 @@ use Cwd; + use FindBin; + + +-BEGIN { +- # Download / Update submodules +- my $set_config = !qx{git config rakudo.initialized}; +- if ( !-e '3rdparty/nqp-configure/LICENSE' ) { +- my $code = system($^X, 'tools/build/update-submodules.pl', Cwd::cwd(), @ARGV); +- exit 1 if $code; +- $set_config = 1; +- } +- if ($set_config) { +- system("git config submodule.recurse true"); +- system("git config rakudo.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 5f43cd59aa..3fedf08f6d 100644 --- a/gnu/packages/perl6.scm +++ b/gnu/packages/perl6.scm @@ -27,6 +27,7 @@ (define-module (gnu packages perl6) #:use-module (guix build-system perl) #:use-module (guix build-system rakudo) #:use-module (gnu packages) + #:use-module (gnu packages gcc) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) @@ -188,64 +189,89 @@ (define-public nqp (define-public rakudo (package (name "rakudo") - (version "2019.03.1") + (version "2022.07") (source - (origin - (method url-fetch) - (uri (string-append "https://rakudo.perl6.org/downloads/rakudo/rakudo-" - version ".tar.gz")) - (sha256 - (base32 - "1nllf69v8xr6v3kkj7pmryg11n5m3ajfkr7j72pvhrgnjy8lv3r1")))) + (origin + (method url-fetch) + (uri (string-append "https://rakudo.perl6.org/dl/rakudo/rakudo-" + version ".tar.gz")) + (sha256 (base32 "1bchc3r0axrif2mfgpbadcgi8vgkdq8syksv0lm7klp1akbcjfvs")) + (patches (search-patches "rakudo.do-not-pull-files-via-git.patch")))) (build-system perl-build-system) (arguments '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-source-date - (lambda _ - (substitute* "tools/build/gen-version.pl" - (("gmtime") "gmtime(0)")) - #t)) (add-after 'patch-source-shebangs 'patch-more-shebangs (lambda _ (substitute* '("tools/build/create-js-runner.pl" - "tools/build/create-moar-runner.p6" "tools/build/create-jvm-runner.pl" - "src/core/Proc.pm6") - (("/bin/sh") (which "sh"))) - #t)) + "src/core.c/Proc.pm6") + (("/bin/sh") + (which "sh"))))) (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (nqp (assoc-ref inputs "nqp"))) - (invoke "perl" "./Configure.pl" + (let ((out (assoc-ref outputs "out")) + (nqp (assoc-ref inputs "nqp")) + (nqp-config (assoc-ref inputs "nqp-configure"))) + (setenv "RAKULIB" (string-append nqp-config "/lib:" + (or (getenv "RAKULIB") ""))) + (invoke "perl" + "./Configure.pl" "--backend=moar" "--with-nqp" (string-append nqp "/bin/nqp") "--prefix" out)))) - ;; This is the recommended tool for distro maintainers to install perl6 + (add-before 'check 'setup-for-rakudo-tests + (lambda _ + ;; fudging tests requires downloading the Roast spectests + (substitute* "Makefile" + (("M_HARNESS5_WITH_FUDGE) --verbosity=1") + "M_HARNESS5) --verbosity=1")) + (setenv "HOME" "/tmp/") + (mkdir-p "/tmp/.raku/short") ;needed for t/05-messages/03-errors.t + (substitute* "t/09-moar/01-profilers.t" + (("ok.*\\$htmlpath" html-test-text) + (string-append "todo \"harness5 fails to write html profile\";" + html-test-text))))) + ;; This is the recommended tool for distro maintainers to install Raku ;; modules systemwide. See: https://github.com/ugexe/zef/issues/117 (add-after 'install 'install-dist-tool (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) + (let* ((out (assoc-ref outputs "out")) (dest (string-append out "/share/perl6/tools"))) (install-file "tools/install-dist.p6" dest) - (substitute* (string-append dest "/install-dist.p6") - (("/usr/bin/env perl6") - (string-append out "/bin/perl6")))) - #t))))) + (install-file "tools/install-dist.raku" dest) + (substitute* `(,(string-append dest "/install-dist.raku") + ,(string-append dest "/install-dist.p6")) + (("/usr/bin/env raku") + (string-append out "/bin/raku"))))))))) (inputs - (list moarvm nqp openssl)) + (list libatomic-ops ;\ + libuv ; for NativeCall + libtommath ;/ + gcc ; could be a native-input, but needed for NativeCall in practice + nqp)) + (native-inputs + (list nqp-configure)) (home-page "https://rakudo.org/") (native-search-paths - (list (search-path-specification - (variable "PERL6LIB") - (separator ",") - (files '("share/perl6/lib" - "share/perl6/site/lib" - "share/perl6/vendor/lib"))))) - (synopsis "Perl 6 Compiler") - (description "Rakudo Perl is a compiler that implements the Perl 6 -specification and runs on top of several virtual machines.") + (list (search-path-specification + (variable "RAKULIB") + (separator ",") + (files '("share/nqp/lib" + "share/perl6/lib" "share/raku/lib" + "share/perl6/site/lib" "share/raku/site/lib" + "share/perl6/vendor/lib" "share/raku/vendor/lib"))))) + (synopsis "Compiler for the Raku programming language") + (description "Rakudo is a compiler for Raku, a programming language +that prioritizes expressiveness and is optimized for fun. More specifically, +Raku is an omni-paradigm, open source, concurrency friendly, metaprogrammable, +JIT- and AOT-compiled, interoperable, linguistically inspired, and gradually +typed programming language with Regex/Unicode superpowers. Raku's initial +design was lead by Larry Wall and Raku was formerly known as Perl 6. + +Rakudo is written primarily in Raku, with lower-level features in NQP; +Rakudo implements the Roast specification suite for Raku compilers and +targets multiple virtual machines including MoarVM.") (license license:artistic2.0))) (define-public perl6-grammar-debugger