From e5a6f2702b151db69a2035db0f0e38b0586e8b57 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Thu, 11 Aug 2011 02:29:10 +0000 Subject: [PATCH] openjdk: Add the 'jre' output. Note that this is almost completely useless for now, when openjdk is built a separate store path containing only the jre will be built but it will not be added to the environment nor as a gc root. If you want to install just the jre, for now build openjre (which uses the jreOnly parameter). Once multiple outputs are more feature-complete, this should hopefully be useful and remove the need for the jreOnly parameter svn path=/nixpkgs/trunk/; revision=28481 --- pkgs/development/compilers/openjdk/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/openjdk/default.nix b/pkgs/development/compilers/openjdk/default.nix index 1020c58189d8..f7b000170a0c 100644 --- a/pkgs/development/compilers/openjdk/default.nix +++ b/pkgs/development/compilers/openjdk/default.nix @@ -50,6 +50,8 @@ stdenv.mkDerivation rec { sha256 = "17n0i5cgvfsd6ric70h3n7hr8aqnzd216gaq3603wrxlvggzxbp6"; }; + outputs = [ "out" ] ++ stdenv.lib.optionals (! jreOnly) [ "jre" ]; + buildInputs = [ unzip procps @@ -114,7 +116,10 @@ stdenv.mkDerivation rec { installPhase = '' ensureDir $out cp -av build/*/j2${if jreOnly then "re" else "sdk"}-image/* $out - ''; + '' + (if jreOnly then "" else '' + ensureDir $jre + cp -av build/*/j2re-image/* $jre + ''); meta = { homepage = http://openjdk.java.net/;