java: Normalize to the default jre / jdk

This commit is contained in:
William A. Kennington III 2015-01-01 15:49:20 -08:00
parent bbc4262514
commit c82410eeda
20 changed files with 36 additions and 42 deletions

View File

@ -17,7 +17,7 @@ let
launcher = writeScriptBin "riemann" ''
#!/bin/sh
exec ${openjdk}/bin/java ${concatStringsSep "\n" cfg.extraJavaOpts} \
exec ${jdk}/bin/java ${concatStringsSep "\n" cfg.extraJavaOpts} \
-cp ${classpath} \
riemann.bin ${writeText "riemann-config.clj" riemannConfig}
'';

View File

@ -22,7 +22,7 @@ let
cp common/lib/*.jar $out/lib/
ln -s ${pkgs.ant}/lib/ant/lib/ant.jar $out/lib/
ln -s ${cfg.solrPackage}/lib/ext/* $out/lib/
ln -s ${pkgs.openjdk}/lib/openjdk/lib/tools.jar $out/lib/
ln -s ${pkgs.jdk.home}/lib/tools.jar $out/lib/
'' + optionalString (cfg.extraJars != []) ''
for f in ${concatStringsSep " " cfg.extraJars}; do
cp $f $out/lib

View File

@ -61,12 +61,12 @@ in rec {
gettext
git
imagemagick
jdk
linux
mysql51
mysql55
nginx
nodejs
openjdk
openssh
php
postgresql92

View File

@ -70,9 +70,7 @@ let
cp -va . "$out/$name"
ln -s "$out/$name/bin/${loName}.png" "$out/share/pixmaps/"
[ -d ${jdk}/lib/openjdk ] \
&& jdk=${jdk}/lib/openjdk \
|| jdk=${jdk}
jdk=${jdk.home}
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${loName}" \
--prefix PATH : "${jdk}/bin:${coreutils}/bin:${gnugrep}/bin:${which}/bin:${git}/bin" \

View File

@ -50,7 +50,7 @@ stdenv.mkDerivation {
patch package-files/linux/jedit << EOF
5a6,8
> # specify the correct JAVA_HOME
> JAVA_HOME=${jdk.jre}/lib/openjdk/jre
> JAVA_HOME=${jdk.jre.home}/jre
>
EOF
sed -i "s|/usr/share/jEdit/@jar.filename@|$out/share/jEdit/jedit.jar|g" package-files/linux/jedit

View File

@ -26,8 +26,8 @@ stdenv.mkDerivation {
mkdir -p $out/bin
makeWrapper $out/netbeans/bin/netbeans $out/bin/netbeans \
--prefix PATH : ${jdk}/bin:${which}/bin \
--prefix JAVA_HOME : ${jdk}/lib/openjdk \
--add-flags "--jdkhome ${jdk}/lib/openjdk"
--prefix JAVA_HOME : ${jdk.home} \
--add-flags "--jdkhome ${jdk.home}"
# Create desktop item, so we can pick it from the KDE/GNOME menu
mkdir -p $out/share/applications

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, imake, zlib, openjdk, libX11, libXt, libXmu
{ stdenv, fetchurl, imake, zlib, jdk, libX11, libXt, libXmu
, libXaw, libXext, libXpm, openjpeg, openssl, tcl, tk }:
stdenv.mkDerivation rec {
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
sha256 = "74df32eb8eaa68b07c9693a232ebe42154617c7f3cbe1d4e68d3fe7c557d618d";
};
buildInputs = [ imake zlib openjdk libX11 libXt libXmu libXaw libXext libXpm openjpeg openssl ];
buildInputs = [ imake zlib jdk libX11 libXt libXmu libXaw libXext libXpm openjpeg openssl ];
configurePhase = "makeFlags=PREFIX=$out";

View File

@ -213,7 +213,7 @@ stdenv.mkDerivation rec {
"--disable-postgresql-sdbc"
"--with-package-format=native"
"--enable-epm"
"--with-jdk-home=${jdk}/lib/openjdk"
"--with-jdk-home=${jdk.home}"
"--with-ant-home=${ant}/lib/ant"
"--without-fonts"
"--without-myspell-dicts"

View File

@ -44,9 +44,7 @@ stdenv.mkDerivation rec {
# unpacking should have produced a dir named 'smartgit'
cp -a smartgit/* ${pkg_path}
mkdir -pv ${bin_path}
[ -d ${jre}/lib/openjdk ] \
&& jre=${jre}/lib/openjdk \
|| jre=${jre}
jre=${jre.home}
makeWrapper ${pkg_path}/bin/smartgit.sh ${bin_path}/smartgit \
--prefix PATH : ${runtime_paths} \
--prefix LD_LIBRARY_PATH : ${runtime_lib_paths} \

View File

@ -9,7 +9,7 @@
, antBuildInputs ? []
, buildfile ? "build.xml"
, ant ? pkgs.ant
, jre ? pkgs.openjdk
, jre ? pkgs.jdk
, hydraAntLogger ? pkgs.hydraAntLogger
, zip ? pkgs.zip
, unzip ? pkgs.unzip

View File

@ -1,5 +1,5 @@
{ fetchgit, stdenv, gmp, which, flex, bison, makeWrapper
, autoconf, automake, libtool, openjdk, perl }:
, autoconf, automake, libtool, jdk, perl }:
stdenv.mkDerivation {
name = "aldor-1.2.0";
@ -11,7 +11,7 @@ stdenv.mkDerivation {
};
buildInputs = [ gmp which flex bison makeWrapper autoconf automake libtool
openjdk perl ];
jdk perl ];
preConfigure = ''
cd aldor ;
@ -22,7 +22,7 @@ stdenv.mkDerivation {
for prog in aldor unicl javagen ;
do
wrapProgram $out/bin/$prog --set ALDORROOT $out \
--prefix PATH : ${openjdk}/bin \
--prefix PATH : ${jdk}/bin \
--prefix PATH : ${stdenv.cc}/bin ;
done
'';

View File

@ -2,7 +2,7 @@
, libX11, graphicsmagick, pcre, liblapack, pkgconfig, mesa, fltk
, fftw, fftwSinglePrec, zlib, curl, qrupdate
, qt ? null, qscintilla ? null, ghostscript ? null, llvm ? null, hdf5 ? null,glpk ? null
, suitesparse ? null, gnuplot ? null, openjdk ? null, python ? null
, suitesparse ? null, gnuplot ? null, jdk ? null, python ? null
}:
stdenv.mkDerivation rec {
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
++ (stdenv.lib.optional (hdf5 != null) hdf5)
++ (stdenv.lib.optional (glpk != null) glpk)
++ (stdenv.lib.optional (suitesparse != null) suitesparse)
++ (stdenv.lib.optional (openjdk != null) openjdk)
++ (stdenv.lib.optional (jdk != null) jdk)
++ (stdenv.lib.optional (gnuplot != null) gnuplot)
++ (stdenv.lib.optional (python != null) python)
;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip, cmake, /*openjdk,*/ alsaLib }:
{ stdenv, fetchurl, unzip, cmake, /*jdk,*/ alsaLib }:
stdenv.mkDerivation rec {
name = "portmidi-${version}";
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
};
cmakeFlags = let
#base = "${openjdk}/jre/lib/${openjdk.architecture}";
#base = "${jdk}/jre/lib/${jdk.architecture}";
in [
"-DPORTMIDI_ENABLE_JAVA=0"
/* TODO: Fix Java support.
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
ln -s libportmidi.so "$out/lib/libporttime.so"
'';
buildInputs = [ unzip cmake /*openjdk*/ alsaLib ];
buildInputs = [ unzip cmake /*jdk*/ alsaLib ];
meta = {
homepage = "http://portmedia.sourceforge.net/portmidi/";

View File

@ -64,7 +64,7 @@ stdenv.mkDerivation {
import os, sys
os.environ['PYTHONPATH'] = '$(echo ${python.modules.sqlite3}/lib/python*/site-packages)'
os.environ['JAVA_HOME'] = '${if stdenv.system == "x86_64-darwin" then jdk else "${jdk}/lib/openjdk"}'
os.environ['JAVA_HOME'] = '${jdk.home}'
os.execv('$(pwd)/.builder.py', sys.argv)
EOF

View File

@ -61,7 +61,7 @@ stdenv.mkDerivation {
import os, sys
os.environ['PYTHONPATH'] = '$(echo ${python.modules.sqlite3}/lib/python*/site-packages)'
os.environ['JAVA_HOME'] = '${if stdenv.system == "x86_64-darwin" then jdk else "${jdk}/lib/openjdk"}'
os.environ['JAVA_HOME'] = '${jdk.home}'
os.execv('$(pwd)/.builder.py', sys.argv)
EOF

View File

@ -61,7 +61,7 @@ stdenv.mkDerivation {
import os, sys
os.environ['PYTHONPATH'] = '$(echo ${python.modules.sqlite3}/lib/python*/site-packages)'
os.environ['JAVA_HOME'] = '${if stdenv.system == "x86_64-darwin" then jdk else "${jdk}/lib/openjdk"}'
os.environ['JAVA_HOME'] = '${jdk.home}'
os.execv('$(pwd)/.builder.py', sys.argv)
EOF

View File

@ -61,7 +61,7 @@ stdenv.mkDerivation {
import os, sys
os.environ['PYTHONPATH'] = '$(echo ${python.modules.sqlite3}/lib/python*/site-packages)'
os.environ['JAVA_HOME'] = '${if stdenv.system == "x86_64-darwin" then jdk else "${jdk}/lib/openjdk"}'
os.environ['JAVA_HOME'] = '${jdk.home}'
os.execv('$(pwd)/.builder.py', sys.argv)
EOF

View File

@ -14,8 +14,8 @@ else assert licenseAccepted;
# the installer is very picky and demands 1.7.0.07
let dotInstall4j = path: writeTextFile { name = "dot-install4j"; text = ''
JRE_VERSION ${jre}${path} 1 7 0 7
JRE_INFO ${jre}${path} 94
JRE_VERSION ${path} 1 7 0 7
JRE_INFO ${path} 94
''; };
responseVarfile = writeTextFile { name = "response.varfile"; text = ''
@ -55,20 +55,20 @@ in stdenv.mkDerivation rec {
sed -e 's/^if \[ -f jre.tar.gz/if false /' $src > installer
chmod a+x installer
cp ${dotInstall4j ""} .install4j
cp ${dotInstall4j jre} .install4j
chmod u+w .install4j
sed -e "s|INSTALLDIR|$out|" ${responseVarfile} > response.varfile
export HOME=`pwd`
export INSTALL4J_JAVA_HOME=${jre}
export INSTALL4J_JAVA_HOME=${jre.home}
export FONTCONFIG_FILE=${fontsConf}
bash -ic './installer -q -varfile response.varfile'
sed -i 's/Xmx450m/Xmx900m/;s/Xss192k/Xss384k/' $out/lib/neoload/conf/agent.properties
for i in $out/bin/*; do
wrapProgram $i --run 'cp ${dotInstall4j "/lib/openjdk/jre"} ~/.install4j' \
wrapProgram $i --run 'cp ${dotInstall4j "${jre.home}/jre"} ~/.install4j' \
--run 'chmod u+w ~/.install4j'
done

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, makeWrapper, which, coreutils, rrdtool, perl, perlPackages
, python, ruby, openjdk, nettools
, python, ruby, jre, nettools
}:
stdenv.mkDerivation rec {
@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
perlPackages.DBDPg
python
ruby
openjdk
jre
# tests
perlPackages.TestLongString
perlPackages.TestDifferences
@ -91,7 +91,7 @@ stdenv.mkDerivation rec {
PERL=${perl}/bin/perl
PYTHON=${python}/bin/python
RUBY=${ruby}/bin/ruby
JAVARUN=${openjdk}/bin/java
JAVARUN=${jre}/bin/java
PLUGINUSER=munin
'';

View File

@ -1362,7 +1362,7 @@ let
grafx2 = callPackage ../applications/graphics/grafx2 {};
grails = callPackage ../development/web/grails {
jdkPath = "${openjdk}/lib/openjdk";
jdkPath = jdk.home;
};
graphviz = callPackage ../tools/graphics/graphviz { };
@ -3445,7 +3445,7 @@ let
icedtea7_jdk = callPackage ../development/compilers/icedtea rec {
jdk = openjdk;
jdkPath = "${openjdk}/lib/openjdk";
jdkPath = openjdk.home;
giflib = giflib_5_0;
} // { outputs = [ "out" ]; };
@ -7617,7 +7617,7 @@ let
cassandra = callPackage ../servers/nosql/cassandra { };
apache-jena = callPackage ../servers/nosql/apache-jena/binary.nix {
java = icedtea_jdk;
java = jdk;
};
apcupsd = callPackage ../servers/apcupsd { };
@ -11265,9 +11265,7 @@ let
vorbisTools = callPackage ../applications/audio/vorbis-tools { };
vue = callPackage ../applications/misc/vue {
jre = icedtea_jre;
};
vue = callPackage ../applications/misc/vue { };
vwm = callPackage ../applications/window-managers/vwm { };