unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Rutherther <rutherther@ditigal.xyz>
Cc: Julien Lepiller <julien@lepiller.eu>,
	74405@debbugs.gnu.org, 74406@debbugs.gnu.org
Subject: [bug#74405] [bug#74406] [PATCH 1/1] gnu: antlr4: Pass full path to java in bin executable
Date: Thu, 02 Jan 2025 22:51:28 +0900	[thread overview]
Message-ID: <87wmfd5nof.fsf@gmail.com> (raw)
In-Reply-To: <27ea0b2b5326c827fd03399b4009c1bb62d81600.1731870758.git.rutherther@ditigal.xyz> (rutherther@ditigal.xyz's message of "Sun, 17 Nov 2024 20:43:58 +0100")

Hi Rutherther,

Apologies for the delay, this had been tagged as SPAM by big G.

Rutherther <rutherther@ditigal.xyz> writes:

> The executable outputted by antlr4 package does not
> refer to full path of java, but to standalone "java".
> That means the package expects java to be in PATH.
> Since it's an application, requiring java to run,
> it should rather refer to full path of java executable
> it was built with/for.
>
> * gnu/packages/java.scm: (antrl4)[arguments]: Change "java" in bin/antlr4 for full path
>
> Change-Id: I311b9ec54a90fc7251eb8fcb62b232e843853e64
> ---
>  gnu/packages/java.scm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index df57385ea7..8607b62bea 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -8866,13 +8866,14 @@ (define-public antlr4
>           (add-after 'install 'bin-install
>             (lambda* (#:key inputs outputs #:allow-other-keys)
>               (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
> -                   (bin (string-append (assoc-ref outputs "out") "/bin")))
> +                   (bin (string-append (assoc-ref outputs "out") "/bin"))
> +                   (java (search-input-file inputs "bin/java")))
>                 (mkdir-p bin)
>                 (with-output-to-file (string-append bin "/antlr4")
>                   (lambda _
>                     (display
>                       (string-append "#!" (which "sh") "\n"
> -                                    "java -cp " jar "/antlr4.jar:"
> +                                    java " -cp " jar "/antlr4.jar:"

Hm.  I'm not sure what is the state of the art here for our Java
packages; it makes sense that it should work out of the box, but perhaps
there's a reason to want to have it run with any Java available on PATH?

I'll defer to Julien, which I believe has done more work with Java in
Guix.

-- 
Thanks,
Maxim




  reply	other threads:[~2025-01-02 13:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-17 19:15 [bug#74406] [PATCH 0/1] antlr4 package does not refer to java executable by full path Rutherther via Guix-patches via
2024-11-17 19:17 ` [bug#74405] [PATCH 1/1] gnu: antlr4: Pass full path to java in bin executable Rutherther via Guix-patches via
2025-01-02 13:51   ` Maxim Cournoyer [this message]
2024-12-04 19:12 ` [bug#74405] [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments Rutherther via Guix-patches via
2024-12-04 19:14   ` Rutherther via Guix-patches via
2025-01-02 13:45     ` Maxim Cournoyer
2024-12-04 19:15   ` [bug#74695] [PATCH 1/1] guix: qt: add inputs and outputs build variables in qt-build Rutherther via Guix-patches via
2025-01-02 13:48   ` [bug#74405] [PATCH 0/1] qt-build-system: Wrap with build variables to allow %outputs in arguments Maxim Cournoyer

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=87wmfd5nof.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=74405@debbugs.gnu.org \
    --cc=74406@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    --cc=rutherther@ditigal.xyz \
    /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).