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 KAIYMYUFEGIxZgEAgWs5BA (envelope-from ) for ; Fri, 18 Feb 2022 21:45:57 +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 6ObtKYUFEGLlBwEAG6o9tA (envelope-from ) for ; Fri, 18 Feb 2022 21:45:57 +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 E85633BBC0 for ; Fri, 18 Feb 2022 21:45:56 +0100 (CET) Received: from localhost ([::1]:45360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLA8Z-0007t1-MZ for larch@yhetil.org; Fri, 18 Feb 2022 15:45:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLA5m-000554-U9 for guix-patches@gnu.org; Fri, 18 Feb 2022 15:43:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34343) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nLA5m-00005n-KM for guix-patches@gnu.org; Fri, 18 Feb 2022 15:43:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nLA5m-0005o0-Cs for guix-patches@gnu.org; Fri, 18 Feb 2022 15:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54021] [PATCH] if, at first, you don't succeed... 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: Fri, 18 Feb 2022 20:43: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: 54021@debbugs.gnu.org Received: via spool by 54021-submit@debbugs.gnu.org id=B54021.164521694722269 (code B ref 54021); Fri, 18 Feb 2022 20:43:02 +0000 Received: (at 54021) by debbugs.gnu.org; 18 Feb 2022 20:42:27 +0000 Received: from localhost ([127.0.0.1]:56473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLA5C-0005n6-DW for submit@debbugs.gnu.org; Fri, 18 Feb 2022 15:42:26 -0500 Received: from mail-pl1-f178.google.com ([209.85.214.178]:41727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLA5A-0005mt-Ni for 54021@debbugs.gnu.org; Fri, 18 Feb 2022 15:42:25 -0500 Received: by mail-pl1-f178.google.com with SMTP id j4so8051165plj.8 for <54021@debbugs.gnu.org>; Fri, 18 Feb 2022 12:42:24 -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=oSzwYtNKKuszWJ+svRnNpUuskMW3TnuaIaaQK6pUCtc=; b=dULeZKns0ZUAbYVZ09fPf/mAkV89XhHG2Ge3zLzDzlgHfyG4SxsMMW0K9vEySlcfrq daNrvIyBfNfdYfvqOv8jgvc8Zbm3CJYYdv3MVEU7h97bzNcJ0ZHFpXLqdOzvIHyksuBX SSzy6oV1nNpqLm3I6n1TJ2OTbJzMZXdBDHK8DqosJ3XzVhaJz4LyXCSGccpuScfh9pnZ QKoYQBj/i+HGvJXCOKteHGPiH/EYmMslKT3HbgSSwuOWv5S+/sk1MzWBgc+Y5/mncq7y YYQhRSs36MZQjGG14Vl/bdCtF7dWVAjaXQHKuEVazr8ETlGdG968giBGgsd51OXiFdCW db+w== 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=oSzwYtNKKuszWJ+svRnNpUuskMW3TnuaIaaQK6pUCtc=; b=q4MtS3MVnA/HWNeu0cRWXgSKV+pb1ubiutNwk5FJ1MM8JiSoMGhE0TlAWW0k5o8YhQ d3iza/CZqZLgXcr4OYgTNnYqg4O4LNcAIazCFjydz+6sll3EsNYBUpP+mS9FMVuNUgzb qk1g66fTgK1xbyMUi7VXpUY6VZtXcxz70k22FOBxzd9k0WgFH+1v3eAmSU/m8v9IFPm1 YGhUxIcxMlVv6VHPGGWDKllGhHPgdtbacNM9eVECm8r9eTFBsOEDgaJfXWmg6EBOfboT bfroNz+YvkMSGmIKwjGFgd5DT956nUIDh/vNRwp884f5d6FeySgB4R0AjVIAGnvB5Zk2 7l2A== X-Gm-Message-State: AOAM530+8hNv/wukH8jC/Wqhxo7xUs3JVuRGQco/AjwRMoBenxRT+l7H 10SvCojOcJ8of9HQb9Q5Eos= X-Google-Smtp-Source: ABdhPJw+9DJoltbPa7CnBfeCod8U6ohwk+nhcjV2jmlabIlCodQGrP68HcWYBR4HDRjDQ84BnjOcGQ== X-Received: by 2002:a17:90b:4a02:b0:1b8:d3c7:7a2b with SMTP id kk2-20020a17090b4a0200b001b8d3c77a2bmr14327431pjb.194.1645216938735; Fri, 18 Feb 2022 12:42:18 -0800 (PST) Received: from Ginko.local ([66.170.190.211]) by smtp.gmail.com with ESMTPSA id h5sm4144917pfi.18.2022.02.18.12.42.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 12:42:17 -0800 (PST) From: Frank Pursel Date: Fri, 18 Feb 2022 12:42:16 -0800 Message-ID: <87k0drrjo7.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=1645217157; 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=oSzwYtNKKuszWJ+svRnNpUuskMW3TnuaIaaQK6pUCtc=; b=AHEJE7WhFXZUM6BkQSjIiWSfwg/6UPwfCGQ/heKq0oqfxR4FAyNL+tgJ93R5ByAG7Pamor 5SR0mxXmcjkFxRqJiwd6tIU0/+OkGkvEsaJSydCMDhdkkbHiqiX+FDBRv/Whks8btFfcNl ODeKdwcsRB91gNZyoKspq5dNQspcoYFxePzluJKx9LYzkY4G84tbJFbrNvy+YxiQTW/MlP +DsUwbIGW/fio24FI0M9tbVRYJonpqKRa5LdHuigod7qxGHcjG1wIgDSNviuPT0upVL2Aj PpSTxwjyuqt7lJdoOMtB9FZcuRrVqBlmP3EG++Gm+bUFjgkuhchdneZX1JPJSw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645217157; a=rsa-sha256; cv=none; b=agTsILRp+vHcS7aj9thguGwTxXehEvC4UyLVhYTZYFHaKIkdMvY5Gzrz7/lPL8nJ/FjeN6 UR8kev5yuVemFajmuM0bjlMWqpSn4G5glHC/+QNKOWv2JaEZBhAJqV52VUpOXueZh2fGC4 INMBbeERKftdcB5tr5xn7VLJ+m0EHwJscmHBcNQMLxlJ2Z6U7RQ1wqWoqX8PpwQbCnsD9w Y8ISRb6FHtmt/Cn0FD6aPn/DyRetWY77VqfcLRqkeMrRV+R8e+tjWAPFdi+6avRz/qxtsm fAq2KaMEX2G7ESt+kx+RN/sHO5F901ELk5YFj4aJfJ5a/3eptr2sT6yQL2t/ow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dULeZKns; 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.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dULeZKns; 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: E85633BBC0 X-Spam-Score: -2.03 X-Migadu-Scanner: scn1.migadu.com X-TUID: ERg3On/7OFVf Hi, I think this addresses all the identified issues and, best of all, does it with a now, meaningful check phase. Regards, Frank >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. * guix/gnu/package/javascript.scm (rhino): Added package. --- gnu/packages/javascript.scm | 106 +++++++++++++++++++++++++++++++++++- 1 file changed, 105 insertions(+), 1 deletion(-) 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) #: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 co= de and vice versa.") (license license:expat))) + +(define-public rhino + (let* ((rel-ver "1.7.7.2") + (commit "935942527ff434b205e797df4185518e5369466e")) + (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")) + (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$")))))) + (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) + (with-directory-excursion "man" + (install-file "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