From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +JI8AYslHWLIRgAAgWs5BA (envelope-from ) for ; Mon, 28 Feb 2022 20:42:03 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eHyGOYolHWKMYwAAauVa8A (envelope-from ) for ; Mon, 28 Feb 2022 20:42:02 +0100 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 6904313209 for ; Mon, 28 Feb 2022 20:42:01 +0100 (CET) Received: from localhost ([::1]:45456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOluC-00032M-DW for larch@yhetil.org; Mon, 28 Feb 2022 14:42:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOlrK-0000TC-DX for guix-patches@gnu.org; Mon, 28 Feb 2022 14:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOlrK-0007aR-4T for guix-patches@gnu.org; Mon, 28 Feb 2022 14:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOlrJ-0003Nn-Uh for guix-patches@gnu.org; Mon, 28 Feb 2022 14:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54021] [PATCH] package for rhino References: <87pmnnr2qq.fsf@gmail.com> In-Reply-To: <87pmnnr2qq.fsf@gmail.com> Resent-From: Frank Pursel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 28 Feb 2022 19:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54021 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54021@debbugs.gnu.org Received: via spool by 54021-submit@debbugs.gnu.org id=B54021.164607712912983 (code B ref 54021); Mon, 28 Feb 2022 19:39:01 +0000 Received: (at 54021) by debbugs.gnu.org; 28 Feb 2022 19:38:49 +0000 Received: from localhost ([127.0.0.1]:34828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOlr6-0003NL-Nc for submit@debbugs.gnu.org; Mon, 28 Feb 2022 14:38:49 -0500 Received: from mail-pl1-f173.google.com ([209.85.214.173]:39748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOlr5-0003N8-BP for 54021@debbugs.gnu.org; Mon, 28 Feb 2022 14:38:47 -0500 Received: by mail-pl1-f173.google.com with SMTP id l9so11186903pls.6 for <54021@debbugs.gnu.org>; Mon, 28 Feb 2022 11:38:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ENW518vj3+MnlDisXXXuBbgYaXl+s5KTCST4+/MD90o=; b=c+pGTzns7WiLVvq/VvxIupDuTsjC300QCgb40dJzyCnTxZL0ix3N8C8+uMaDz6za6z 3Nyov3HFhF3gPOnFj+nR/0IykB1tyWy0KDRpH1Z+o+w/1ViyZm4XDwHfMzyvjUESBUUD 0kz47Fp9RRowsp+sP2mw9JPl3ZkBsmYebJY+V2OstRt3uvCBkcb5V/RRdgEPn27XKYhJ Qa39sO5rDKFcir0MCVB1fOu1S5nRIVdjtwHoRbkxIBKrJ5sJ8cYUjcPkQND2VAw9vYm8 s8mGpkR+wVqIuEv18J9U/9VAdA3Jzi9f8j61CgapTgXt9HN97bcZmi4FBlfk492UIXBA 3pdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ENW518vj3+MnlDisXXXuBbgYaXl+s5KTCST4+/MD90o=; b=a/0KMMcBa87PhTvFuuHVNdsBCxOeHa8L7hw0zvZIjC5cgMwDpYLYDvWLEcv9GbxeDh fdB7zpXMQllyjZCwgzAsjvvtnuRqCx0y9ANBDrLJe0wQbuX6w3zp2dJB04MmnTv1Vm+n pYdnSfnoNRkR37m/pkTGnWHsAY59+mt26QT089PW5EWBsRPckoTWsuN8ogUVPzTPS2gQ zqmJMymq3NQXzYLiejUfU3T1yyVS6UES4pqvcEwFeFUBy4xzgjojaqjLfj8YoFk37jsO PUopI2G3QIN7L/+GSllwLubM35We9kvRfJjf8Oj/O6g1nXj31MfZnC+1wVo6SRZXhNXy Tcgw== X-Gm-Message-State: AOAM533WsNHQ+3k36pu0vqqSjRo+6Uphkc1PPWOW2/kYJTMoFp7eChLy /yN1NTbDEzVaKAK7cilo5FM= X-Google-Smtp-Source: ABdhPJzfRttshnwTbtygGGFAvw40uShl5lu00U16fseO5b1wycY06tDQVqhlbgSRDZlwZ6wlWX6gJg== X-Received: by 2002:a17:903:2289:b0:151:64c6:20fd with SMTP id b9-20020a170903228900b0015164c620fdmr7436984plh.64.1646077121246; Mon, 28 Feb 2022 11:38:41 -0800 (PST) Received: from Ginko.local ([66.170.190.211]) by smtp.gmail.com with ESMTPSA id g10-20020a056a000b8a00b004de9129eb80sm14475631pfj.85.2022.02.28.11.38.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 11:38:40 -0800 (PST) From: Frank Pursel Date: Mon, 28 Feb 2022 11:38:39 -0800 Message-ID: <87pmn6eq80.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646077321; h=from:from:sender:sender: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: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=ENW518vj3+MnlDisXXXuBbgYaXl+s5KTCST4+/MD90o=; b=Drd3n9srLhf0PL//2Oo2aL41di4GWH4SunGf5F8sKKF3JCNGOmEO4bHIntvalQN4QZcex0 /KMyrQpAkWBOmsi66K5Yd6wuZ+Dt3tqkDc14QQADbWCkNlt2apbNjcAHWE5JF6ADk+DXOW bNC3kGBVP9fbpP7PYMz9RNxya/Hdzvq28fLGySOWo6G0kKG/zwAygqlyeL74DD/h2XkcM6 eJadfIENl9+MJhRuTlf293AO9t6zGP5C7oRCGhjd5amDXpQIx17N0qd6C4I6fqhhAFiMeQ OeKtBsg1J5aqofL33YgQcnkKy9jAmFvmMdcBnlp7OV9c1Svq7JWL3JTEsQa9Dw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646077321; a=rsa-sha256; cv=none; b=p0vfvPYoxmApDml0QZQKrcAnJQcpY/CNUO5TPSMHVk1P2VTRiL/jl0XpUUrmFbLxEbI3JM 9XID1is2QL6mL8McxoHXO2PJTvBofQADPWHNIjVKvG4wSHsDZ46IlIrAleOIxqzVyO9nde yGJJq3CrBzZM4LXbzqLVZ86va+RgmM5ZDiAhO4yWoaZcyCADhhu6KOmKU7d53yFnVTtlDt ZopuivznfCbMsENPvEH1F4SWI5b7SMnXGWvDHjLGzQlwlKEK6OeYX1BuEWolc+kcDgMQQl hPpBZwPZQTbhZxsD3l5tgbRHktfGWhdREEaiOdtNiPluZzua9sBFcvDRSqADDA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=c+pGTzns; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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.81 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=c+pGTzns; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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: 6904313209 X-Spam-Score: 5.81 X-Migadu-Scanner: scn1.migadu.com X-TUID: MfgaFyXs0dsV Julien, A single patch, to rule them all, as requested. :) This patch should add the rhino package to the existing javascript.scm file. I think all the issues have been addressed. Thank you for your patience. Regards, Frank >From a422095cf0ac8778936661952d375abd35293253 Mon Sep 17 00:00:00 2001 Message-Id: From: Frank Pursel Date: Tue, 15 Feb 2022 14:07:28 -0800 Subject: [PATCH] Adding rhino javascript guix package. * guix/gnu/package/javascript.scm (rhino): Added package. --- gnu/packages/javascript.scm | 103 +++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index 779ffcb7b8..68d338de8d 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -6,6 +6,7 @@ ;;; Copyright =C2=A9 2018 Nicolas Goaziou ;;; Copyright =C2=A9 2021 Pierre Neidhardt ;;; Copyright =C2=A9 2021 Maxim Cournoyer +;;; Copyright =C2=A9 2022 Frank Pursel ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,7 +27,9 @@ (define-module (gnu packages javascript) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages compression) + #:use-module (gnu packages java) #:use-module (gnu packages node) #:use-module (gnu packages readline) #:use-module (gnu packages uglifyjs) @@ -34,10 +37,11 @@ (define-module (gnu packages javascript) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) - #:use-module (guix build-system gnu) + #:use-module (guix build-system ant) #:use-module (guix build-system cmake) - #:use-module (guix build-system trivial) + #:use-module (guix build-system gnu) #:use-module (guix build-system minify) + #:use-module (guix build-system trivial) #:use-module (guix utils)) =20 (define-public cjson @@ -791,3 +795,98 @@ (define-public duktape your build, and use the Duktape API to call ECMAScript functions from C co= de and vice versa.") (license license:expat))) + +(define-public rhino + (package + (name "rhino") + (version "1.7.7.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mozilla/rhino.git") + (commit "935942527ff434b205e797df4185518e5369466e"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "09i4yr98hs6855fs7fhgmrpiwpr90lhxdv2bvfj97nn4rv1d7wl8")) + (modules '((guix build utils))) + (snippet '(begin + ;; Remove benchmark testing + (delete-file-recursively "testsrc/benchmarks") + (delete-file-recursively + "testsrc/org/mozilla/javascript/benchmarks") + ;; Identify bundled jars + (format #t "~%~a~%" "Sourced jars") + (for-each (lambda (f) + (format #t "~/Deleting: ~a~%" f) + (delete-file f)) + (find-files "." "\\.jar$")))))) + (build-system ant-build-system) + (inputs (list bash-minimal)) + (native-inputs (list java-junit java-hamcrest-core java-snakeyaml)) + (arguments + `(#:phases + (modify-phases + %standard-phases + (replace 'check + (lambda* (#:key tests? inputs native-inputs + #:allow-other-keys) + (when tests? + (setenv "ANT_OPTS" "-Doffline=3Dtrue") + (let ((junit-lib + (assoc-ref inputs "java-junit")) + (hamcrest-lib + (assoc-ref inputs "java-hamcrest-core")) + (snakeyaml-lib + (assoc-ref inputs "java-snakeyaml"))) + (with-directory-excursion "testsrc" + (substitute* "build.xml" + (("" all) + (string-append "")) + (("" all) + (string-append "")) + (("" + all) + (string-append "")) + (("" all) + (string-append "")) + (("") + (string-append + "")) + (("") + (string-append "")) + (("") + (string-append "")) + ;; Disabling instrumentation. + (("(")))) + (invoke "ant" "junit"))))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pkg+ver (string-append ,name ,version)) + (bin (string-append out "/bin")) + (rhino (string-append bin "/rhino")) + (man (string-append out "/share/man/man1"))) + (mkdir-p bin) + (install-file "man/rhino.1" man) + (install-file (string-append "build/" pkg+ver + "/js.jar") + (string-append out "/share/java")) + (with-output-to-file rhino + (lambda _ + (format #t "#!~a~%~a -jar ~a $@~%" + (search-input-file inputs "/bin/bash= ") + (search-input-file inputs "/bin/java= ") + (string-append out "/share/java/js.j= ar")))) + (chmod rhino #o755))))))) + (home-page "https://mozilla.github.io/rhino") + (synopsis "Javascript implemented in Java") + (description + "Rhino implements ECMAScript, also known as JavaScript, in Java as +specified in the fifth edition of ECMA-262.") + (license license:mpl2.0))) + --=20 2.34.0