diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2019-02-24 20:44:44 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2019-03-23 22:26:48 +0200 |
commit | f7f8e767cd55c3731b85ede8d329e501d32c097a (patch) | |
tree | 6ccfb718f9559042fbed2a554cae3bad0908f17c /gnu/packages/perl6.scm | |
parent | af2dec5bf360ec05cbdf9a074527ede1b1fdeb1e (diff) | |
download | patches-f7f8e767cd55c3731b85ede8d329e501d32c097a.tar patches-f7f8e767cd55c3731b85ede8d329e501d32c097a.tar.gz |
gnu: Add rakudo.
* gnu/packages/perl6.scm (rakudo): New variable.
Diffstat (limited to 'gnu/packages/perl6.scm')
-rw-r--r-- | gnu/packages/perl6.scm | 68 |
1 files changed, 67 insertions, 1 deletions
diff --git a/gnu/packages/perl6.scm b/gnu/packages/perl6.scm index 3f7b813d3c..b6781936f1 100644 --- a/gnu/packages/perl6.scm +++ b/gnu/packages/perl6.scm @@ -25,7 +25,8 @@ #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) #:use-module (gnu packages multiprecision) - #:use-module (gnu packages pkg-config)) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages tls)) (define-public moarvm (package @@ -159,3 +160,68 @@ 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 regular expression engine for the virtual machine.") (license license:artistic2.0))) + +(define-public rakudo + (package + (name "rakudo") + (version "2019.03.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://rakudo.perl6.org/downloads/rakudo/rakudo-" + version ".tar.gz")) + (sha256 + (base32 + "1nllf69v8xr6v3kkj7pmryg11n5m3ajfkr7j72pvhrgnjy8lv3r1")))) + (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)) + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (nqp (assoc-ref inputs "nqp"))) + (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 + ;; 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")) + (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))))) + (inputs + `(("moarvm" ,moarvm) + ("nqp" ,nqp) + ("openssl" ,openssl))) + (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.") + (license license:artistic2.0))) |