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 aAPGAAWWE2LiBgAAgWs5BA (envelope-from ) for ; Mon, 21 Feb 2022 14:39:17 +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 YNOTOASWE2LcEgAAauVa8A (envelope-from ) for ; Mon, 21 Feb 2022 14:39:16 +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 721123A428 for ; Mon, 21 Feb 2022 14:39:15 +0100 (CET) Received: from localhost ([::1]:57634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM8uH-000537-Oz for larch@yhetil.org; Mon, 21 Feb 2022 08:39:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM8bo-0007Kx-Mk for guix-patches@gnu.org; Mon, 21 Feb 2022 08:20:12 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nM8bi-0005nR-FZ for guix-patches@gnu.org; Mon, 21 Feb 2022 08:20:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nM8bi-00080M-7E for guix-patches@gnu.org; Mon, 21 Feb 2022 08:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54021] [PATCH] if, at first, you don't succeed... Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 21 Feb 2022 13:20:02 +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: Frank Pursel Cc: 54021@debbugs.gnu.org Received: via spool by 54021-submit@debbugs.gnu.org id=B54021.164544958130739 (code B ref 54021); Mon, 21 Feb 2022 13:20:02 +0000 Received: (at 54021) by debbugs.gnu.org; 21 Feb 2022 13:19:41 +0000 Received: from localhost ([127.0.0.1]:35352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM8bN-0007zi-3j for submit@debbugs.gnu.org; Mon, 21 Feb 2022 08:19:41 -0500 Received: from flashner.co.il ([178.62.234.194]:38342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM8bK-0007zV-V7 for 54021@debbugs.gnu.org; Mon, 21 Feb 2022 08:19:39 -0500 Received: from localhost (unknown [31.210.181.166]) by flashner.co.il (Postfix) with ESMTPSA id 0393A40313; Mon, 21 Feb 2022 13:19:32 +0000 (UTC) Date: Mon, 21 Feb 2022 15:19:00 +0200 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Frank Pursel , 54021@debbugs.gnu.org References: <87pmnnr2qq.fsf@gmail.com> <87k0drrjo7.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="b+tMgGiLkILPEmjt" Content-Disposition: inline In-Reply-To: <87k0drrjo7.fsf@gmail.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 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=1645450755; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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; bh=VbpIpWPBX9466pT5XF74Qn2WRVu/+gQjgY0XBGhyX5E=; b=Wa5yt+z/Y1eIc7acho6eFznVZ+kjkq4E70t/lhJbbHb4Hsb4DrBLz7psDXnfRhI+i3WLj2 KOL5krd94r2QuIOyxwGMKIaJunnAZj72odckpKSw0FLo99LrczAVvg67ND9YRIvv8Dl02W dAVOyCrUvEoI+aWyGnacrSs7v0JIK3O6SQMNRv5JrjN2dKpka0EXqREzhWXgAAy9t2O1TQ cfVoNn7D/q0Q3GVUEJcRBBLBubd6JH7L6NXyAhcZmRKjbS5O3g4r94mwLF4ZYi3OKXUHIx rmryyzGzl5bnYY5vejujw1Sgt4Zs+fBJ9y8pDrt5lMvozOYQGYgHizgdN5Q/yQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645450755; a=rsa-sha256; cv=none; b=G8t43KUwZGokX5oHpeNm9A+3cm0NXuwDhT1hHkioxpWe/UBWHdVWjEfy9J+ajcfCFHQzEJ gykeruJECP+EfpFpFx+rLX333HaE7pPLV7OgbMuIu2WUMr9gfGhT69Ke0P96wML1PMY9C6 UYXsOxmSLi8nRp1s8tbYvy9yjkUyp9qfwVZsmms2uaB9G4GJ5CA/Xj+044EXxTtI4PL6Nk 3z+Z+9Y0ruHQbtNxdcL+AAhH5hWJJhJmSJBK4kGYufuQkuBXdR47oGQu5iz8FWd7D5yfV2 mg0fJ9K8+gbP9mzM8crSuo5zWTJhAyp/NbxNZNFmK6mKsQwxT9ZL/JPNC6ZZ4Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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: -4.73 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: 721123A428 X-Spam-Score: -4.73 X-Migadu-Scanner: scn1.migadu.com X-TUID: +VcMxNQ4Rst/ --b+tMgGiLkILPEmjt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 18, 2022 at 12:42:16PM -0800, Frank Pursel wrote: > Hi, >=20 > I think this addresses all the identified issues and, best of all, does it > with a now, meaningful check phase. Very nice! > Regards, > Frank >=20 > From e45fd6a53579327667067ca0642e97d0cb373d5c 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. >=20 > * guix/gnu/package/javascript.scm (rhino): Added package. > --- > gnu/packages/javascript.scm | 106 +++++++++++++++++++++++++++++++++++- > 1 file changed, 105 insertions(+), 1 deletion(-) >=20 > diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm > index c453ac432a..158abaded7 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. > ;;; > @@ -31,6 +32,9 @@ (define-module (gnu packages javascript) > #:use-module (gnu packages readline) > #:use-module (gnu packages uglifyjs) > #:use-module (gnu packages web) > + #:use-module (gnu packages java) > + #:use-module (gnu packages bash) > + #:use-module (gnu packages perl) Please sort the (gnu packages ...) alphabetically :) > #:use-module (guix packages) > #:use-module (guix download) > #:use-module (guix git-download) > @@ -38,7 +42,9 @@ (define-module (gnu packages javascript) > #:use-module (guix build-system cmake) > #:use-module (guix build-system trivial) > #:use-module (guix build-system minify) > - #:use-module (guix utils)) > + #:use-module (guix build-system ant) > + #:use-module (guix utils) > + #:use-module (guix gexp)) > =20 > (define-public cjson > (package > @@ -788,3 +794,101 @@ (define-public duktape > your build, and use the Duktape API to call ECMAScript functions from C = code > and vice versa.") > (license license:expat))) > + > +(define-public rhino > + (let* ((rel-ver "1.7.7.2") > + (commit "935942527ff434b205e797df4185518e5369466e")) rel-ver and commit can actually go in version and commit respectively, they don't need to be separated out at the top. > + (package > + (name "rhino") > + (version rel-ver) > + (source (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/mozilla/rhino.git") > + (commit commit))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + "09i4yr98hs6855fs7fhgmrpiwpr90lhxdv2bvfj97nn4rv1d7wl8"= )) > + (modules '((guix build utils))) > + (snippet '(begin > + ;; Remove benchmark testing > + (with-directory-excursion > + "testsrc" > + (delete-file-recursively "benchmarks")) This can be (delete-file-recursively "testsrc/benchmarks"). Similar with the one below it. > + (with-directory-excursion > + "testsrc/org/mozilla/javascript" > + (delete-file-recursively "benchmarks")) > + ;; Identify bundled jars > + (format #t "~%~a~%" "Sourced jars") > + (for-each (lambda (f) > + (format #t "~/~a~%" f)) > + (find-files "." ".*\\.jar$")))))) This one is small, in find-files you don't need the leading '.*' before \\.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 " + "\" includes=3D\"**/*.jar\"/>")) > + (("") > + (string-append " + "\" includes=3D\"**/*.jar\"/>")) > + ;; Disabling instrumentation. > + (("( + (string-append pre "\">")))) > + (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) > + (with-directory-excursion "man" > + (install-file "rhino.1" man)) This one can just be (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/ba= sh") > + (search-input-file inputs "/bin/ja= va") > + (string-append out "/share/java/js= =2Ejar")))) > + (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") Needs a period at the end of the description. > + (license license:mpl2.0)))) > + > --=20 > 2.34.0 >=20 >=20 >=20 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --b+tMgGiLkILPEmjt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmITkUEACgkQQarn3Mo9 g1H1Jg//dEKekg6ljwXYDhoqtSEA120ugGXAlESOd4SagGZkltvrpqecZzgDmHZR 3OuqHI1uKBRcuB2CK0m8ntEgK7f5ZyzMFos1XVxI9w9PzpDohXGcXKf64yMQwKyw p4D7KLYIl4X5P+C2HVkN6yqMvXWVntqDhdl4XmmwGy5UwTTQIzReYHerK6AwIIjh 6qNd6yhURqrU9POOxwfjswS0try90RF5dPI6U5tPRjgRgOKXCZjf+XwTqk16TmYo 8vKCTsp+0Dz6MIaaUNxvXpigY1M1RK9UvpitrPbPP+3wm1+tqH2/fqtC3Nf7EXca 9odii0beJ6Sn9p81Hs4Y+ucPOhlyOIenOn2Tps8HPfFtUIO5SfSxI9w7GSr77d5A yVxbeUimymNuM0Lo2scRAQwpHQcvb/A7TOb632jIvWX394Wg8JODnMXuw796doLh r3WKr4X1soCvdC2nmUeex1ELmwDsMrcJ21hhzmMUuwNnzBtxl6TzU2RriDWiINRC fvY30PZiWLGZ0um5KUl9WHgW2acyqNto8l4pB4E6ra1yO1stEyVF07m5q6Xaf8fq rN8Mtd0zMbgmEzb2i2OVrXpZgLgza3SdJEnP6eQQVLJo955aDoqVUnnZSvIijA5U 87Hr3V/T9Hut7fliKTU6pGxHaqRo8tJL9C4L/UWnl5wnJ4uNwjw= =O+Ts -----END PGP SIGNATURE----- --b+tMgGiLkILPEmjt--