mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
ant-build-system: Add unpack phase.
* guix/build/ant-build-system.scm (unpack): New procedure. (%standard-phases): Use it.
This commit is contained in:
parent
987a118334
commit
932f2b70a6
1 changed files with 12 additions and 0 deletions
|
@ -86,6 +86,17 @@ (define (generate-classpath inputs)
|
|||
(find-files dir "\\.*jar$")))
|
||||
inputs)) ":"))
|
||||
|
||||
(define* (unpack #:key source #:allow-other-keys)
|
||||
"Unpack the jar archive SOURCE. When SOURCE is not a jar archive fall back
|
||||
to the default GNU unpack strategy."
|
||||
(if (string-suffix? ".jar" source)
|
||||
(begin
|
||||
(mkdir "src")
|
||||
(with-directory-excursion "src"
|
||||
(zero? (system* "jar" "-xf" source))))
|
||||
;; Use GNU unpack strategy for things that aren't jar archives.
|
||||
((assq-ref gnu:%standard-phases 'unpack) #:source source)))
|
||||
|
||||
(define* (configure #:key inputs outputs (jar-name #f)
|
||||
#:allow-other-keys)
|
||||
(when jar-name
|
||||
|
@ -151,6 +162,7 @@ (define* (install #:key (make-flags '()) #:allow-other-keys)
|
|||
|
||||
(define %standard-phases
|
||||
(modify-phases gnu:%standard-phases
|
||||
(replace 'unpack unpack)
|
||||
(replace 'configure configure)
|
||||
(replace 'build build)
|
||||
(replace 'check check)
|
||||
|
|
Loading…
Reference in a new issue