about summary refs log tree commit diff
path: root/pkgs/development/compilers/openjdk
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-06 14:14:43 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-06 14:36:14 +0100
commit90e533b6858a47deecff9fda027985dc68a7ac02 (patch)
tree369fcd377f60b9e891b510799d7274737cae1b6d /pkgs/development/compilers/openjdk
parent5d6259a9739d03f6ae2751b342689c877e7209df (diff)
downloadnixlib-90e533b6858a47deecff9fda027985dc68a7ac02.tar
nixlib-90e533b6858a47deecff9fda027985dc68a7ac02.tar.gz
nixlib-90e533b6858a47deecff9fda027985dc68a7ac02.tar.bz2
nixlib-90e533b6858a47deecff9fda027985dc68a7ac02.tar.lz
nixlib-90e533b6858a47deecff9fda027985dc68a7ac02.tar.xz
nixlib-90e533b6858a47deecff9fda027985dc68a7ac02.tar.zst
nixlib-90e533b6858a47deecff9fda027985dc68a7ac02.zip
openjre: Propagate setJavaClassPath
Thus, any package that has the JRE or JDK in its build inputs will
automatically have $CLASSPATH set up properly.
Diffstat (limited to 'pkgs/development/compilers/openjdk')
-rw-r--r--pkgs/development/compilers/openjdk/default.nix60
1 files changed, 14 insertions, 46 deletions
diff --git a/pkgs/development/compilers/openjdk/default.nix b/pkgs/development/compilers/openjdk/default.nix
index c451d680beac..234f294eff3e 100644
--- a/pkgs/development/compilers/openjdk/default.nix
+++ b/pkgs/development/compilers/openjdk/default.nix
@@ -1,29 +1,6 @@
-{ stdenv
-, fetchurl
-, unzip
-, zip
-, procps
-, coreutils
-, alsaLib
-, ant
-, freetype
-, cups
-, which
-, jdk
-, nettools
-, libX11
-, libXt
-, libXext
-, libXrender
-, libXtst
-, libXi
-, libXinerama
-, libXcursor
-, fontconfig
-, cpio
-, cacert
-, perl
-}:
+{ stdenv, fetchurl, unzip, zip, procps, coreutils, alsaLib, ant, freetype, cups
+, which, jdk, nettools, libX11, libXt, libXext, libXrender, libXtst, libXi, libXinerama
+, libXcursor, fontconfig, cpio, cacert, perl, setJavaClassPath }:
 
 let
 
@@ -54,26 +31,11 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "jre" ];
 
-  buildInputs = [
-    unzip
-    procps
-    ant
-    which
-    zip
-    cpio
-    nettools
-    alsaLib
-    libX11
-    libXt
-    libXext
-    libXrender
-    libXtst
-    libXi
-    libXinerama
-    libXcursor
-    fontconfig
-    perl
-  ];
+  buildInputs =
+    [ unzip procps ant which zip cpio nettools alsaLib
+      libX11 libXt libXext libXrender libXtst libXi libXinerama libXcursor
+      fontconfig perl
+    ];
 
   NIX_LDFLAGS = "-lfontconfig -lXcursor -lXinerama";
 
@@ -149,6 +111,12 @@ stdenv.mkDerivation rec {
     prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}"
     patchELF $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 = {