From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59851) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiocP-0003Fj-0x for guix-patches@gnu.org; Sat, 21 Dec 2019 18:57:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iiocI-0006es-Df for guix-patches@gnu.org; Sat, 21 Dec 2019 18:57:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42970) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iiocI-0006dr-9H for guix-patches@gnu.org; Sat, 21 Dec 2019 18:57:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iiocI-0007lp-6Q for guix-patches@gnu.org; Sat, 21 Dec 2019 18:57:02 -0500 Subject: [bug#38704] [PATCH] gnu: clojure: Add wrapper. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:58270) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iioc8-0003Ff-0g for guix-patches@gnu.org; Sat, 21 Dec 2019 18:56:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iioc6-0005vs-Dc for guix-patches@gnu.org; Sat, 21 Dec 2019 18:56:51 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:39193) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iioc5-0005cQ-MN for guix-patches@gnu.org; Sat, 21 Dec 2019 18:56:49 -0500 Received: by mail-pj1-x102d.google.com with SMTP id t101so5795883pjb.4 for ; Sat, 21 Dec 2019 15:56:48 -0800 (PST) Received: from piranhaplant.local ([199.68.53.171]) by smtp.googlemail.com with ESMTPSA id m71sm17683320pje.0.2019.12.21.15.56.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2019 15:56:44 -0800 (PST) From: Jesse Gibbons Message-ID: <0c8be989d029bb4e8590f579e0b550f4f6905a2a.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Sat, 21 Dec 2019 16:56:43 -0700 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38704@debbugs.gnu.org gnu/packages/clojure.scm: (clojure)[inputs]: Add icedtea. [phases] {make-wrapper}: New phase. fixes: https://issues.guix.gnu.org/issue/32709 --- 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 © 2018 Alex Vong ;;; Copyright © 2018 Pierre Neidhardt ;;; Copyright © 2019 Tobias Geerinckx-Rice +;;; Copyright © 2019 Jesse Gibbons ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (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" + (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")