treewide: JAVA_HOME may not always be defined
This commit is contained in:
parent
45e5e68c53
commit
373236ccff
@ -37,7 +37,7 @@ let cpuName = stdenv.hostPlatform.parsed.cpu.name;
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -54,7 +54,7 @@ let result = stdenv.mkDerivation rec {
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> "$out/nix-support/setup-hook"
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -270,7 +270,7 @@ in rec {
|
||||
# Set JAVA_HOME automatically.
|
||||
mkdir -p $out/nix-support
|
||||
cat <<EOF > $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
postFixup = openjdk.postFixup or null;
|
||||
|
@ -72,7 +72,7 @@ let
|
||||
# Set JAVA_HOME automatically.
|
||||
mkdir -p $out/nix-support
|
||||
cat <<EOF > $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -106,7 +106,7 @@ let
|
||||
# Set JAVA_HOME automatically.
|
||||
mkdir -p $out/nix-support
|
||||
cat <<EOF > $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out/lib/openjdk; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out/lib/openjdk; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -231,7 +231,7 @@ let
|
||||
# Set JAVA_HOME automatically.
|
||||
mkdir -p $out/nix-support
|
||||
cat <<EOF > $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out/lib/openjdk; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out/lib/openjdk; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -44,7 +44,7 @@ let
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -44,7 +44,7 @@ let
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -44,7 +44,7 @@ let
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -114,7 +114,7 @@ let
|
||||
# Set JAVA_HOME automatically.
|
||||
mkdir -p $out/nix-support
|
||||
cat <<EOF > $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out/lib/openjdk; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out/lib/openjdk; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -156,7 +156,7 @@ let result = stdenv.mkDerivation rec {
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -58,7 +58,7 @@ in stdenv.mkDerivation {
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -55,7 +55,7 @@ in stdenv.mkDerivation {
|
||||
|
||||
# Set JAVA_HOME automatically.
|
||||
cat <<EOF >> $out/nix-support/setup-hook
|
||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user