|
From: | Ricardo Wurmus |
Subject: | [bug#35545] [PATCH 06/17] gnu: javacc: Install binaries. |
Date: | Sat, 04 May 2019 13:52:11 +0200 |
User-agent: | mu4e 1.0; emacs 26.1 |
Julien Lepiller <address@hidden> writes: > * gnu/packages/java.scm (javacc)[arguments]: Add install-bin phase. […] > + (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`" " $*")))) I think it’s better not to use basename here. We already know the store location. > + (chmod (string-append bin "/javacc") #o755) > + (symlink (string-append bin "/javacc") > + (string-append bin "/jjdoc")) > + (symlink (string-append bin "/javacc") > + (string-append bin "/jjtree")))))))) Why symlink javacc with different names? Since you’re reusing the javacc file name so often it makes sense to let-bind it. Please end the build phase on #T. -- Ricardo
[Prev in Thread] | Current Thread | [Next in Thread] |