openjre: Propagate setJavaClassPath

Thus, any package that has the JRE or JDK in its build inputs will
automatically have $CLASSPATH set up properly.
This commit is contained in:
Eelco Dolstra 2014-01-06 14:14:43 +01:00
parent 5d6259a973
commit 90e533b685

View File

@ -1,29 +1,6 @@
{ stdenv { stdenv, fetchurl, unzip, zip, procps, coreutils, alsaLib, ant, freetype, cups
, fetchurl , which, jdk, nettools, libX11, libXt, libXext, libXrender, libXtst, libXi, libXinerama
, unzip , libXcursor, fontconfig, cpio, cacert, perl, setJavaClassPath }:
, zip
, procps
, coreutils
, alsaLib
, ant
, freetype
, cups
, which
, jdk
, nettools
, libX11
, libXt
, libXext
, libXrender
, libXtst
, libXi
, libXinerama
, libXcursor
, fontconfig
, cpio
, cacert
, perl
}:
let let
@ -54,25 +31,10 @@ stdenv.mkDerivation rec {
outputs = [ "out" "jre" ]; outputs = [ "out" "jre" ];
buildInputs = [ buildInputs =
unzip [ unzip procps ant which zip cpio nettools alsaLib
procps libX11 libXt libXext libXrender libXtst libXi libXinerama libXcursor
ant fontconfig perl
which
zip
cpio
nettools
alsaLib
libX11
libXt
libXext
libXrender
libXtst
libXi
libXinerama
libXcursor
fontconfig
perl
]; ];
NIX_LDFLAGS = "-lfontconfig -lXcursor -lXinerama"; NIX_LDFLAGS = "-lfontconfig -lXcursor -lXinerama";
@ -149,6 +111,12 @@ stdenv.mkDerivation rec {
prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}" prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}"
patchELF $jre patchELF $jre
propagatedNativeBuildInputs+=" $jre" propagatedNativeBuildInputs+=" $jre"
# Propagate the setJavaClassPath setup hook from the JRE so that
# any package that depends on the JRE has $CLASSPATH set up
# properly.
mkdir -p $jre/nix-support
echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-native-build-inputs
''; '';
meta = { meta = {