neoload: fix for the new jdk/jre location

This commit is contained in:
Mathijs Kwik 2014-03-25 16:00:06 +01:00
parent 284ea5859b
commit 5943227a26
1 changed files with 6 additions and 7 deletions

View File

@ -13,9 +13,9 @@ if !licenseAccepted then throw ''
else assert licenseAccepted;
# the installer is very picky and demands 1.7.0.07
let dotInstall4j = writeTextFile { name = "dot-install4j"; text = ''
JRE_VERSION ${jre} 1 7 0 7
JRE_INFO ${jre} 94
let dotInstall4j = path: writeTextFile { name = "dot-install4j"; text = ''
JRE_VERSION ${jre}${path} 1 7 0 7
JRE_INFO ${jre}${path} 94
''; };
responseVarfile = writeTextFile { name = "response.varfile"; text = ''
@ -48,7 +48,6 @@ in stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/lib/neoload
ln -s ${jre} $out/lib/neoload/jre
# the installer wants to use its internal JRE
# disable this. The extra spaces are needed because the installer carries
@ -56,7 +55,7 @@ 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 ""} .install4j
chmod u+w .install4j
sed -e "s|INSTALLDIR|$out|" ${responseVarfile} > response.varfile
@ -66,7 +65,7 @@ in stdenv.mkDerivation rec {
bash -ic './installer -q -varfile response.varfile'
for i in $out/bin/*; do
wrapProgram $i --run 'cp ${dotInstall4j} ~/.install4j' \
wrapProgram $i --run 'cp ${dotInstall4j "/lib/openjdk/jre"} ~/.install4j' \
--run 'chmod u+w ~/.install4j'
done
@ -75,7 +74,7 @@ in stdenv.mkDerivation rec {
name=$(basename "$i")
sed -e 's|/lib/neoload/bin|/bin|' "$i" > "$out/share/applications/$name"
done
rm $out/lib/neoload/*.desktop $out/lib/neoload/uninstall
rm -r $out/lib/neoload/*.desktop $out/lib/neoload/uninstall
'';