From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CE1WGFAkuF+tWwAA0tVLHw (envelope-from ) for ; Fri, 20 Nov 2020 20:17:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MGZGFFAkuF9hcgAAbx9fmQ (envelope-from ) for ; Fri, 20 Nov 2020 20:17:20 +0000 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 A83A8940105 for ; Fri, 20 Nov 2020 20:17:19 +0000 (UTC) Received: from localhost ([::1]:52784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgCqM-0002K7-Hq for larch@yhetil.org; Fri, 20 Nov 2020 15:17:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgCq6-00024B-VT for guix-patches@gnu.org; Fri, 20 Nov 2020 15:17:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:32814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kgCq6-0001p8-OF for guix-patches@gnu.org; Fri, 20 Nov 2020 15:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kgCq6-0005JZ-Kh for guix-patches@gnu.org; Fri, 20 Nov 2020 15:17:02 -0500 Subject: bug#38704: [PATCH] gnu: clojure: Add wrapper. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Fri, 20 Nov 2020 20:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 38704 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jesse Gibbons Cc: 38704-done@debbugs.gnu.org Mail-Followup-To: 38704@debbugs.gnu.org, mail@cbaines.net, jgibbons2357@gmail.com Received: via spool by 38704-done@debbugs.gnu.org id=D38704.160590338120361 (code D ref 38704); Fri, 20 Nov 2020 20:17:02 +0000 Received: (at 38704-done) by debbugs.gnu.org; 20 Nov 2020 20:16:21 +0000 Received: from localhost ([127.0.0.1]:44357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgCpR-0005IL-1F for submit@debbugs.gnu.org; Fri, 20 Nov 2020 15:16:21 -0500 Received: from mira.cbaines.net ([212.71.252.8]:37742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgCpP-0005ID-6l for 38704-done@debbugs.gnu.org; Fri, 20 Nov 2020 15:16:19 -0500 Received: from localhost (188.30.135.14.threembb.co.uk [188.30.135.14]) by mira.cbaines.net (Postfix) with ESMTPSA id 2D5D927BBF5; Fri, 20 Nov 2020 20:16:18 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 5a590c76; Fri, 20 Nov 2020 20:16:15 +0000 (UTC) References: <0c8be989d029bb4e8590f579e0b550f4f6905a2a.camel@gmail.com> User-agent: mu4e 1.4.13; emacs 27.1 From: Christopher Baines In-reply-to: <0c8be989d029bb4e8590f579e0b550f4f6905a2a.camel@gmail.com> Date: Fri, 20 Nov 2020 20:16:11 +0000 Message-ID: <87v9dzkcms.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 1.5 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: 0.5 (/) 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-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -3.11 X-TUID: QAjuvG6X73Ag --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jesse Gibbons writes: > gnu/packages/clojure.scm: (clojure)[inputs]: Add icedtea. > [phases] {make-wrapper}: New phase. > > fixes: https://issues.guix.gnu.org/issue/32709 Hi Jesse, Apologies for the long delay with this patch. I tweaked the commit message, and the patch in one place and I've gone ahead and pushed it to master as d38903fab47fe333a99c68166e98e454d6e0e446. > --- > gnu/packages/clojure.scm | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm > index a9cabfe008..85d8708eee 100644 > --- a/gnu/packages/clojure.scm > +++ b/gnu/packages/clojure.scm > @@ -2,6 +2,7 @@ > ;;; Copyright =C2=A9 2018 Alex Vong > ;;; Copyright =C2=A9 2018 Pierre Neidhardt > ;;; Copyright =C2=A9 2019 Tobias Geerinckx-Rice > +;;; Copyright =C2=A9 2019 Jesse Gibbons > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -20,6 +21,7 @@ >=20=20 > (define-module (gnu packages clojure) > #:use-module (gnu packages) > + #:use-module (gnu packages java) > #:use-module ((guix licenses) #:prefix license:) > #:use-module (guix packages) > #:use-module (guix download) > @@ -77,6 +79,8 @@ > (sha256 > (base32 > "1kcyv2836acs27vi75hvf3r773ahv2nlh9b3j9xa9m9sdanz1h83"))))) > (build-system ant-build-system) > + (inputs > + `(("jre" ,icedtea))) > (arguments > `(#:imported-modules ((guix build clojure-utils) > (guix build guile-build-system) > @@ -113,7 +117,21 @@ > (add-after 'install-license-files 'install-doc > (cut install-doc #:doc-dirs '("doc/clojure/") <...>)) > (add-after 'install-doc 'install-javadoc > - (install-javadoc "target/javadoc/"))))) > + (install-javadoc "target/javadoc/")) > + (add-after 'install 'make-wrapper > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (wrapper (string-append out "/bin/clojure"))) > + (mkdir-p (string-append out "/bin")) > + (with-output-to-file wrapper > + (lambda _ > + (display > + (string-append > + "#!/bin/sh\n\n" I used (which "sh") here rather than hardcoding /bin/sh, as then there's no dependency on the changable /bin/sh. > + (assoc-ref inputs "jre") "/bin/java -jar " > + out "/share/java/clojure.jar \"$@\"\n")))) > + (chmod wrapper #o555)) > + #t))))) > (native-inputs libraries) > (home-page "https://clojure.org/") > (synopsis "Lisp dialect running on the JVM") Thanks again, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl+4JAtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xf8Bg//SCMVPoDALDbo/45DZLkie8IN1wkIr0zN AFOMithJ1AnEu8dY1fEGIv47y8cYRb6ftpyPLBwrA2XhLw2z9yIC7iI+R81TgroS V0FOEskZrK/3loy7mbjCIvJEMBBYGoKxCrrdmqVgi9sSIKyqgXWOq4SAex9qY4SE 8CKM5VnmPNPqSLqG8llKlb/NBHuQFsjv8QZUS5WMfGsakMetKTtXOVmnpZdtUpP5 ZCriEODMr95Nzhe1PLJI0KkCyCpjIM0m2uE+on9dY1Uzx6hJY/JAmXS03KGKlS2z 7IQgHizFF5qzIIrDx1XVpp3ZJZx15LiTb9IxMTnn800qJuNmI2LmRyE5/Qls1R+U fBpkmLsUXL+4RkH8kSKTzH7w+YRCmobsLeIewjGcdsyME8ThUUegcEwyQ9irsbbf oDEpUebpMALigtr/WpcIYvBR80ruVESb6/oGVaVgef5tmeDshiFTl7C2lEUYAL/f eQcebIMFgq96IJg8I9Vzil64Jcnzylwg/2bMMzWn13RNzjDDZVq5DDiNJaW6E5p4 MGkX6OQ29M7p01WbMGujDVGRK8z6VNBEOeSVPRAuBXWcy7IC82Vd7ATB5YGJ7b2h XGDq8ZNdt2tPjxhhbEh80zpxc6EKAyrLWuWWzUzq6iWb/s6L81X9AqL+viFtu//C ey3sw8WhjI8= =oRhN -----END PGP SIGNATURE----- --=-=-=--