guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/26: gnu: Add nqp.


From: guix-commits
Subject: 03/26: gnu: Add nqp.
Date: Sat, 23 Mar 2019 16:31:44 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit af2dec5bf360ec05cbdf9a074527ede1b1fdeb1e
Author: Efraim Flashner <address@hidden>
Date:   Sun Feb 24 20:27:23 2019 +0200

    gnu: Add nqp.
    
    * gnu/packages/perl6.scm (nqp): New variable.
---
 gnu/packages/perl6.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/perl6.scm b/gnu/packages/perl6.scm
index 6a5fa32..3f7b813 100644
--- a/gnu/packages/perl6.scm
+++ b/gnu/packages/perl6.scm
@@ -94,3 +94,68 @@ exceptions, continuations, runtime loading of code, big 
integers and interfacing
 with native libraries.
 @end itemize")
     (license license:artistic2.0)))
+
+(define-public nqp
+  (package
+    (name "nqp")
+    (version "2019.03")
+    (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)))
+        (snippet
+         '(begin
+            (delete-file-recursively "3rdparty") #t))))
+    (build-system perl-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'patch-source-shebangs 'patch-more-shebangs
+           (lambda _
+             (substitute* '("tools/build/install-jvm-runner.pl.in"
+                            "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))
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out  (assoc-ref outputs "out"))
+                   (moar (assoc-ref inputs "moarvm")))
+               (invoke "perl" "Configure.pl"
+                       "--backends=moar"
+                       "--with-moar" (string-append moar "/bin/moar")
+                       "--prefix" out)))))))
+    (inputs
+     `(("moarvm" ,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
+regular expression engine for the virtual machine.")
+    (license license:artistic2.0)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]