diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/build-managers/apache-ant/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/build-managers/apache-ant/default.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/tools/build-managers/apache-ant/default.nix b/nixpkgs/pkgs/development/tools/build-managers/apache-ant/default.nix index 8d1e09eeb338..28e86e291755 100644 --- a/nixpkgs/pkgs/development/tools/build-managers/apache-ant/default.nix +++ b/nixpkgs/pkgs/development/tools/build-managers/apache-ant/default.nix @@ -46,14 +46,14 @@ stdenv.mkDerivation { # JRE by looking for java. The latter allows just the JRE to be # used with (say) ECJ as the compiler. Finally, allow the GNU # JVM. - if [ -z "\$JAVA_HOME" ]; then + if [ -z "\''${JAVA_HOME-}" ]; then for i in javac java gij; do if p="\$(type -p \$i)"; then export JAVA_HOME="\$(${coreutils}/bin/dirname \$(${coreutils}/bin/dirname \$(${coreutils}/bin/readlink -f \$p)))" break fi done - if [ -z "\$JAVA_HOME" ]; then + if [ -z "\''${JAVA_HOME-}" ]; then echo "\$0: cannot find the JDK or JRE" >&2 exit 1 fi |