unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: 35545@debbugs.gnu.org
Subject: [bug#35545] [PATCH 06/17] gnu: javacc: Install binaries.
Date: Fri,  3 May 2019 15:01:23 +0200	[thread overview]
Message-ID: <20190503130134.24788-6-julien@lepiller.eu> (raw)
In-Reply-To: <20190503130134.24788-1-julien@lepiller.eu>

* gnu/packages/java.scm (javacc)[arguments]: Add install-bin phase.
---
 gnu/packages/java.scm | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index c17b8572ec..b203856e2f 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2290,7 +2290,25 @@ debugging, etc.")
        #:test-target "test"
        #:phases
        (modify-phases %standard-phases
-         (replace 'install (install-jars "target")))))
+         (replace 'install (install-jars "target"))
+         (add-after 'install 'install-bin
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (dir (string-append out "/share/java"))
+                    (bin (string-append out "/bin")))
+               (mkdir-p bin)
+               (with-output-to-file (string-append bin "/javacc")
+                 (lambda _
+                   (display
+                     (string-append "#!/bin/sh\n"
+                                    (assoc-ref inputs "jdk") "/bin/java"
+                                    " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
+               (chmod (string-append bin "/javacc") #o755)
+               (symlink (string-append bin "/javacc")
+                        (string-append bin "/jjdoc"))
+               (symlink (string-append bin "/javacc")
+                        (string-append bin "/jjtree"))))))))
+
     (native-inputs
      `(("javacc" ,javacc-4)))))
 
-- 
2.21.0

  parent reply	other threads:[~2019-05-03 13:02 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 12:58 [bug#35545] [PATCH] Add josm Julien Lepiller
2019-05-03 13:01 ` [bug#35545] [PATCH 01/17] gnu: Add java-signpost-core Julien Lepiller
2019-05-03 13:01   ` [bug#35545] [PATCH 02/17] gnu: Add java-jsonp-api Julien Lepiller
2019-05-05 10:37     ` Björn Höfling
2019-05-03 13:01   ` [bug#35545] [PATCH 03/17] gnu: Add java-jsonp-impl Julien Lepiller
2019-05-03 13:01   ` [bug#35545] [PATCH 04/17] gnu: Add java-xmp Julien Lepiller
2019-05-05 10:52     ` Björn Höfling
2019-05-03 13:01   ` [bug#35545] [PATCH 05/17] gnu: Add java-metadata-extractor Julien Lepiller
2019-05-05 11:07     ` Björn Höfling
2019-05-03 13:01   ` Julien Lepiller [this message]
2019-05-04 11:52     ` [bug#35545] [PATCH 06/17] gnu: javacc: Install binaries Ricardo Wurmus
2019-05-04 12:14       ` Julien Lepiller
2019-05-04 17:08         ` Ricardo Wurmus
2019-05-03 13:01   ` [bug#35545] [PATCH 07/17] gnu: Add java-openjfx-build Julien Lepiller
2019-05-03 15:14     ` Nicolas Goaziou
2019-05-04 11:48     ` Ricardo Wurmus
2019-05-04 12:22       ` Julien Lepiller
2019-05-05 22:05     ` Björn Höfling
2019-05-03 13:01   ` [bug#35545] [PATCH 08/17] gnu: Add java-openjfx-base Julien Lepiller
2019-05-03 15:15     ` Nicolas Goaziou
2019-05-04 11:38       ` Julien Lepiller
2019-05-04 21:03         ` Nicolas Goaziou
2019-05-04 11:46     ` Ricardo Wurmus
2019-05-03 13:01   ` [bug#35545] [PATCH 09/17] gnu: Add java-openjfx-graphics Julien Lepiller
2019-05-03 13:01   ` [bug#35545] [PATCH 10/17] gnu: Add java-openjfx-media Julien Lepiller
2019-05-03 13:01   ` [bug#35545] [PATCH 11/17] gnu: Add java-jmapviewer Julien Lepiller
2019-05-05 22:06     ` Björn Höfling
2019-05-03 13:01   ` [bug#35545] [PATCH 12/17] gnu: Add java-svg-salamander Julien Lepiller
2019-05-05 22:07     ` Björn Höfling
2019-05-03 13:01   ` [bug#35545] [PATCH 13/17] gnu: Add java-jboss-transaction-api-spec Julien Lepiller
2019-05-05 22:07     ` Björn Höfling
2019-05-03 13:01   ` [bug#35545] [PATCH 14/17] gnu: Add java-commons-pool2 Julien Lepiller
2019-05-05 22:07     ` Björn Höfling
2019-05-03 13:01   ` [bug#35545] [PATCH 15/17] gnu: Add java-commons-dbcp2 Julien Lepiller
2019-05-03 13:01   ` [bug#35545] [PATCH 16/17] gnu: Add java-commons-jcs Julien Lepiller
2019-05-03 13:01   ` [bug#35545] [PATCH 17/17] gnu: Add josm Julien Lepiller
2019-05-05 22:22     ` Björn Höfling
2019-05-05 10:07   ` [bug#35545] [PATCH 01/17] gnu: Add java-signpost-core Björn Höfling
2019-05-05 11:18 ` [bug#35545] [PATCH] Add josm Björn Höfling
2019-05-05 11:37   ` Julien Lepiller
2019-05-05 22:53     ` Björn Höfling
2019-06-18 12:29       ` Julien Lepiller
2019-06-18 16:14         ` Björn Höfling
2019-06-20 11:39           ` Ludovic Courtès
2019-11-13 21:52 ` bug#35545: " Julien Lepiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190503130134.24788-6-julien@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=35545@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).