gnu: ant-bootstrap: Set environment variables in a separate phase.

* gnu/packages/java.scm (ant-bootstrap)[arguments]: Move 'setenv' calls
to new 'define-java-environment-variables' phase.
This commit is contained in:
Ludovic Courtès 2021-09-01 15:33:06 +02:00
parent fcf857eac4
commit 06247e465f
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -360,16 +360,15 @@ (define ant-bootstrap
(modify-phases %standard-phases
(delete 'bootstrap)
(delete 'configure)
(add-before 'build 'define-java-environment-variables
(lambda* (#:key inputs #:allow-other-keys)
;; First, set environment variables (eases debugging on -K).
(setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
(setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
(setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
(setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
(setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
(setenv "JAVACMD"
(search-input-file inputs "/bin/jamvm"))
(setenv "JAVAC"
(search-input-file inputs "/bin/jikes"))
(setenv "CLASSPATH"
(search-input-file inputs "/lib/rt.jar"))
;; Ant complains if this file doesn't exist.
(setenv "HOME" "/tmp")
(with-output-to-file "/tmp/.ant.properties"