Merge pull request #106737 from taku0/set_classpath
adoptopenjdk: set CLASSPATH
This commit is contained in:
commit
afdee7e058
@ -3,6 +3,7 @@
|
|||||||
{ swingSupport ? true # not used for now
|
{ swingSupport ? true # not used for now
|
||||||
, lib, stdenv
|
, lib, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
|
, setJavaClassPath
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let cpuName = stdenv.hostPlatform.parsed.cpu.name;
|
let cpuName = stdenv.hostPlatform.parsed.cpu.name;
|
||||||
@ -30,7 +31,11 @@ let cpuName = stdenv.hostPlatform.parsed.cpu.name;
|
|||||||
|
|
||||||
ln -s $out/Contents/Home/* $out/
|
ln -s $out/Contents/Home/* $out/
|
||||||
|
|
||||||
|
# Propagate the setJavaClassPath setup hook from the JDK so that
|
||||||
|
# any package that depends on the JDK has $CLASSPATH set up
|
||||||
|
# properly.
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
|
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
|
||||||
|
|
||||||
# Set JAVA_HOME automatically.
|
# Set JAVA_HOME automatically.
|
||||||
cat <<EOF >> $out/nix-support/setup-hook
|
cat <<EOF >> $out/nix-support/setup-hook
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
, fetchurl
|
, fetchurl
|
||||||
, autoPatchelfHook
|
, autoPatchelfHook
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
|
, setJavaClassPath
|
||||||
# minimum dependencies
|
# minimum dependencies
|
||||||
, alsaLib
|
, alsaLib
|
||||||
, fontconfig
|
, fontconfig
|
||||||
@ -74,7 +75,11 @@ let result = stdenv.mkDerivation rec {
|
|||||||
# https://github.com/NixOS/nixpkgs/issues/57733
|
# https://github.com/NixOS/nixpkgs/issues/57733
|
||||||
find "$out" -name 'libfreetype.so*' -delete
|
find "$out" -name 'libfreetype.so*' -delete
|
||||||
|
|
||||||
|
# Propagate the setJavaClassPath setup hook from the JDK so that
|
||||||
|
# any package that depends on the JDK has $CLASSPATH set up
|
||||||
|
# properly.
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
|
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
|
||||||
|
|
||||||
# Set JAVA_HOME automatically.
|
# Set JAVA_HOME automatically.
|
||||||
cat <<EOF >> "$out/nix-support/setup-hook"
|
cat <<EOF >> "$out/nix-support/setup-hook"
|
||||||
|
Loading…
Reference in New Issue
Block a user