guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: clojure: Add bin/clojure wrapper.


From: guix-commits
Subject: branch master updated: gnu: clojure: Add bin/clojure wrapper.
Date: Fri, 20 Nov 2020 15:04:22 -0500

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new d38903f  gnu: clojure: Add bin/clojure wrapper.
d38903f is described below

commit d38903fab47fe333a99c68166e98e454d6e0e446
Author: Jesse Gibbons <jgibbons2357@gmail.com>
AuthorDate: Sat Dec 21 16:56:43 2019 -0700

    gnu: clojure: Add bin/clojure wrapper.
    
    Fixes: https://issues.guix.gnu.org/issue/32709
    
    * gnu/packages/clojure.scm: (clojure)[inputs]: Add icedtea.
    [arguments]: Add make-wrapper phase.
    
    Signed-off-by: Christopher Baines <mail@cbaines.net>
---
 gnu/packages/clojure.scm | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm
index e66132a..5b238ab 100644
--- a/gnu/packages/clojure.scm
+++ b/gnu/packages/clojure.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2019 Jesse Gibbons <jgibbons2357+guix@gmail.com>
 ;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -21,6 +22,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)
@@ -78,6 +80,8 @@
                   (sha256
                    (base32 
"1kcyv2836acs27vi75hvf3r773ahv2nlh9b3j9xa9m9sdanz1h83")))))
       (build-system ant-build-system)
+      (inputs
+       `(("jre" ,icedtea)))
       (arguments
        `(#:imported-modules ((guix build clojure-utils)
                              (guix build guile-build-system)
@@ -114,7 +118,23 @@
            (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
+                       "#!"
+                       (which "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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]