mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 04:29:25 -05:00
gnu: javacc: Install binaries.
* gnu/packages/java.scm (javacc)[arguments]: Add install-bin phase.
This commit is contained in:
parent
a005c63a21
commit
16fdf2f55d
1 changed files with 21 additions and 1 deletions
|
@ -2394,7 +2394,27 @@ (define-public javacc
|
|||
#: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"))
|
||||
(javacc (string-append bin "/javacc")))
|
||||
(mkdir-p bin)
|
||||
(with-output-to-file javacc
|
||||
(lambda _
|
||||
(display
|
||||
(string-append "#!/bin/sh\n"
|
||||
(assoc-ref inputs "jdk") "/bin/java"
|
||||
" -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
|
||||
(chmod javacc #o755)
|
||||
;; symlink to different names to affect the first argument and
|
||||
;; change the behavior of the jar file.
|
||||
(symlink javacc (string-append bin "/jjdoc"))
|
||||
(symlink javacc (string-append bin "/jjtree"))
|
||||
#t))))))
|
||||
|
||||
(native-inputs
|
||||
`(("javacc" ,javacc-4)))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue