From patchwork Thu Nov 9 19:13:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Julien Lepiller X-Patchwork-Id: 56157 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6DBD727BBE9; Thu, 9 Nov 2023 19:15:13 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 059BA27BBE2 for ; Thu, 9 Nov 2023 19:15:13 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1AU8-0003yh-GC; Thu, 09 Nov 2023 14:14:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1ATv-0003rF-I5 for guix-patches@gnu.org; Thu, 09 Nov 2023 14:14:25 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r1ATu-0002Ch-NX for guix-patches@gnu.org; Thu, 09 Nov 2023 14:14:23 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r1AUX-0005p1-Lf for guix-patches@gnu.org; Thu, 09 Nov 2023 14:15:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67026] [PATCH 1/3] gnu: javacc: Do not reference a jdk. References: <20231109195755.67182db2@lepiller.eu> In-Reply-To: <20231109195755.67182db2@lepiller.eu> Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 Nov 2023 19:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67026 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67026@debbugs.gnu.org Received: via spool by 67026-submit@debbugs.gnu.org id=B67026.169955724322279 (code B ref 67026); Thu, 09 Nov 2023 19:15:01 +0000 Received: (at 67026) by debbugs.gnu.org; 9 Nov 2023 19:14:03 +0000 Received: from localhost ([127.0.0.1]:48754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1ATa-0005nA-Qh for submit@debbugs.gnu.org; Thu, 09 Nov 2023 14:14:03 -0500 Received: from lepiller.eu ([89.234.186.109]:47832 helo=hermes.lepiller.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1ATX-0005mY-7d for 67026@debbugs.gnu.org; Thu, 09 Nov 2023 14:14:01 -0500 Received: from hermes.lepiller.eu (localhost [127.0.0.1]) by hermes.lepiller.eu (OpenSMTPD) with ESMTP id 9b4227b0 for <67026@debbugs.gnu.org>; Thu, 9 Nov 2023 19:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=dkim; bh=F7xk2bXyiuWelmltKc9D7m1xw cqdIWPf2xBifRWyklI=; b=j9V8SzvAQDzIFoyUGIWXzLEMjL/0nVirbghdcravZ cKf+T/dCGEFk7MAZSl1SzkKx4L0HR0xYrgJPjWW7vVYDtMLFxrUlnF0GZ5iWIi5o S6TvEOThf1hzWezglHuM6wYZ7+CVMbh2fXAvinxNDLlF22LKGxXB7WXAriDc3rG9 ZNet1c2/sWcgHl5vGW0XfOEo9/V+xp5kiNk7vEfDHegQXTilN0RQAHfC/Q/K3X3V cdLcndU2IcVdof4hQxFPu6O/ik1zi7E9Y3pBADMLQZ38UJf6iiHQ7LCXzhFO/6Ee AsbBf+ka17gXOAbdQ9io/SKHY1W3+m6j7q1mj4HPD3ooA== Received: by hermes.lepiller.eu (OpenSMTPD) with ESMTPSA id 74ea1af7 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <67026@debbugs.gnu.org>; Thu, 9 Nov 2023 19:13:16 +0000 (UTC) From: Julien Lepiller Date: Thu, 9 Nov 2023 20:13:07 +0100 Message-ID: <20231109191309.6876-1-julien@lepiller.eu> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The jdk provides java and javac, while a jre only provides the necessary java, reducing the closure size by 350MB. * gnu/packages/java.scm (javacc): Remove #t at end of phases. [inputs]: Add icedtea-8 as the jre. [arguments]: Use it instead of the jdk. Change-Id: Icb218c40915550b7ff1db96a48a3c48fa6ef52b4 --- gnu/packages/java.scm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 7c8c4e0a36..eded386a03 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2465,8 +2465,7 @@ (define-public javacc (modules '((guix build utils))) ;; Delete bundled jars. (snippet '(begin (for-each delete-file-recursively - '("bootstrap" "lib")) - #t)))) + '("bootstrap" "lib")))))) (arguments `(#:make-flags ; bootstrap from javacc-4 ,#~(list (string-append "-Dbootstrap-jar=" @@ -2487,17 +2486,16 @@ (define-public javacc (lambda _ (display (string-append "#!/bin/sh\n" - (assoc-ref inputs "jdk") "/bin/java" + (assoc-ref inputs "icedtea") "/bin/java" " -cp " dir "/javacc.jar" " `basename $0`" " $*")))) (chmod javacc #o755) ;; symlink to different names to affect the first argument and ;; change the behavior of the jar file. (symlink javacc (string-append bin "/jjdoc")) - (symlink javacc (string-append bin "/jjtree")) - #t)))))) - + (symlink javacc (string-append bin "/jjtree")))))))) (native-inputs - (list javacc-4)))) + (list javacc-4)) + (inputs (list icedtea-8)))) (define-public java-ecj (package