From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eH6YL9xaDGLLTgEAgWs5BA (envelope-from ) for ; Wed, 16 Feb 2022 03:01:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CI9oKNxaDGK4OAAAG6o9tA (envelope-from ) for ; Wed, 16 Feb 2022 03:01:00 +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 1B5EE111F0 for ; Wed, 16 Feb 2022 03:01:00 +0100 (CET) Received: from localhost ([::1]:43302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK9co-0002Eg-8B for larch@yhetil.org; Tue, 15 Feb 2022 21:00:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK9c7-0002ET-Vr for guix-patches@gnu.org; Tue, 15 Feb 2022 21:00:16 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53100) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nK9bv-0001BP-02 for guix-patches@gnu.org; Tue, 15 Feb 2022 21:00:14 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nK9bu-00071u-TG for guix-patches@gnu.org; Tue, 15 Feb 2022 21:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54021] [PATCH] Add rhino javascript package Resent-From: Frank Pursel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 16 Feb 2022 02:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54021 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54021@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164497674626916 (code B ref -1); Wed, 16 Feb 2022 02:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Feb 2022 01:59:06 +0000 Received: from localhost ([127.0.0.1]:46997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK9b0-000702-EC for submit@debbugs.gnu.org; Tue, 15 Feb 2022 20:59:06 -0500 Received: from lists.gnu.org ([209.51.188.17]:50568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nK9az-0006zv-5Q for submit@debbugs.gnu.org; Tue, 15 Feb 2022 20:59:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK9ay-0002Ao-Rg for guix-patches@gnu.org; Tue, 15 Feb 2022 20:59:04 -0500 Received: from [2607:f8b0:4864:20::630] (port=35816 helo=mail-pl1-x630.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nK9aw-00014L-Jm for guix-patches@gnu.org; Tue, 15 Feb 2022 20:59:04 -0500 Received: by mail-pl1-x630.google.com with SMTP id i10so851276plr.2 for ; Tue, 15 Feb 2022 17:58:59 -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=bfkMj73rWQu7AeeQIZEc8GeSZQkKBmlOuGx5GNXOWKI=; b=Nf4UJ7rm18ozEqnrd0ZLegldTtERjzH2yzIvyOsCsDfhfxn9RU7+zNc2TxKIvbjVdp gvb23Xs72+TVQaM89JAc7cUe7w7F9nHE+BPR+im2Ty1ikwN5+iaFNo2xc/epNVQ4Syqo r2bpXZEkM9ZZeoQ5lkZ4xgSKoeVFtmLeeYzBXi4jS1sxjVm410o0OnuUFWxAz+OycRQQ ttaGAiUueKX+tbG/UQKAfXv9EoVYuTaG1NdhEEOUfm9jEBZb5H/OT31g+UF4ue+chwA7 LYWLjMHXHaozyVbCT2ijZf0ADpv9EaPIxhmEr6xfXdTBJ+MIxFaR+cowmA6IXwH4Jx40 HuHQ== 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=bfkMj73rWQu7AeeQIZEc8GeSZQkKBmlOuGx5GNXOWKI=; b=M+v51WrBAUSAlzxBDjJJVpkdLxQ6xRGA8gRkm5/anx9u5ebgZ9zFBSr738+Oe1T0he YCK0G5sXca0fXE9Vlg0IoLtn/BAa3Dwh6AvxZTSIUo7hFTeir2xlSwqSLDEQ7pxoEdIb Q6uxNmKUYpA7WzsZdKk93glyxVmpNoHAfkZnQs2ZA1yRL845gWMwGa83f+M9NsusbMRN KRckZj9k/P06fBnhcSgXnQPQJNjrq6W09AB9u5TLV/P/A8tLqeoVnHk7tKKKTgdWlFMP I0C4Eps98+UFA4egGcVtDiCaKxi3e0dYoXK5swUvrkDIQ3fwfa6SCIk2+D7r6GBbXHy8 Pxvw== X-Gm-Message-State: AOAM532KWYXaJW3J/VfYXPWQgWpxbvwJVCIoaJwDjwbvf86tqNxtIq+Y aYNclUvC5kq23aH6Qd8MRJFViwD90Dk= X-Google-Smtp-Source: ABdhPJxBzacJpLlYg1nJ0Yhdm4TC/HhPQ8Agu4YeEbawsRZXOQk35ze74GdxMB7KTMqNffKTJMf/sg== X-Received: by 2002:a17:90a:a117:b0:1b9:65ef:fa64 with SMTP id s23-20020a17090aa11700b001b965effa64mr351134pjp.102.1644976738341; Tue, 15 Feb 2022 17:58:58 -0800 (PST) Received: from Ginko.local ([66.170.190.211]) by smtp.gmail.com with ESMTPSA id k13sm44429686pfc.176.2022.02.15.17.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 17:58:57 -0800 (PST) From: Frank Pursel Date: Tue, 15 Feb 2022 17:58:53 -0800 Message-ID: <87pmnnr2qq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::630 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=frank.pursel@gmail.com; helo=mail-pl1-x630.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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=1644976860; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=bfkMj73rWQu7AeeQIZEc8GeSZQkKBmlOuGx5GNXOWKI=; b=gtuvuIoc8YV3KSicofUkqsFU2xvvarKXDaBrEk73uPpzcVD+XcaKYrF0dZtuTqyv2ejf6f LUmm3Ed4RAsBo0rqmFhBC3hRi9Ofz30SNkagUjVnzh/YgTrbwfRqs16C+ZBDSeC+Lh4HGp rcI52Q21PMemgbu7tAPqjuQRK6gQTzfT8fK+ZJQyK7wLND49gsH/1TwUxSyJlVAjlJVY0G 1Iiv6sCpHkjiI/hQc6CIUTnZQn8vx6luQDjqU8ph9Mlv0lfBjzw1JBZYqrq+E0ufABC1Cy 65Oeyr8xn+NoCmWu6snYXwBiCcl+8So+KxyPHH6dWBobEkmJ7VwmUKc5F5KeBw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644976860; a=rsa-sha256; cv=none; b=o77oO/uFJ7hia75ZiHQWLC8RltxUM6ioTIllMH4zkwGdrEwdRf4F9kUEY/ks1x1AycnzQA WDZF4v6P8SQ2uO+iWSwZKvBHYS48NJsfW25xn6nKWAFKnUND6/JAPSWKgDkxZMeqdUsLiP abw2hgJXrrktOC5hUmhm2IoxDwQLVFsFS2hMymLrtMI5ON26imzT8dIBytRpaR+07Fkzi/ Xie1FKq0JCoVi2GrSTKuiuS+o+zEm8NR95oxZqfLrfecWAkAP/x3TTDn2ihMeCLvciUYIP TjzM015F6sYhVWmy5uEul+WP5PNNjT+jmOsCExlg2++NfFke94BRPnHAGWdSFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Nf4UJ7rm; 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: -2.23 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Nf4UJ7rm; 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: 1B5EE111F0 X-Spam-Score: -2.23 X-Migadu-Scanner: scn1.migadu.com X-TUID: pZ1MBPGZy8DD Hi, Rhino javascript has been around a long time. It has also been built upon by many others. I needed to build this version for another package and wanted to send it on as it might be useful. Regards, Frank >From c386b47786fc318cdfa0b1157a22590ebc279460 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 | 65 +++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index c453ac432a..e9db0d2ce6 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,7 @@ (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 (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -38,6 +40,7 @@ (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 build-system ant) #:use-module (guix utils)) =20 (define-public cjson @@ -788,3 +791,65 @@ (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 + (let* ((rel-ver "1.7.7.2") (rel-git-tag "Rhino1_7_7_2_Release") + (git-commitv "935942527ff434b205e797df4185518e5369466e") + (git-short-commit (substring git-commitv 0 6)) + (hash "09i4yr98hs6855fs7fhgmrpiwpr90lhxdv2bvfj97nn4rv1d7wl8")) + (package + (name "rhino") + (version git-short-commit) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mozilla/rhino.git") + (commit git-short-commit))) + (file-name (git-file-name name git-short-commit)) + (sha256 + (base32 + hash)))) + (build-system ant-build-system) + (inputs (list java-junit java-hamcrest-core + `(,icedtea "jdk"))) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'clean-jars + (lambda _ + (for-each (lambda (jarf) + (delete-file jarf) + (format #t "Deleted: ~s +" jarf)) + (find-files "." ".*\\.jar$")) #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (setenv "ANT_OPTS" "-Doffline=3Dtrue") + (invoke "ant" "junit")) #t)) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pkg+ver (string-append ,name ,rel-ver)) + (bin (string-append out "/bin")) + (rhino (string-append bin "/rhino"))) + (mkdir-p bin) + (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= ") + (which "java") + (string-append out "/share/java/js.j= ar")))) + (chmod rhino #o755) #t)))))) + (home-page "https://mozilla.github.io/rhino") + (synopsis "Javascript implemented in java") + (description + "The Rhino engine, created primarily by Norris +Boyd (also at Netscape) is a JavaScript implementation written in +Java. Rhino is ECMA-262 Edition 5 compliant.") + (license license:mpl2.0)))) + --=20 2.34.0