2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, writeTextFile, jre, makeWrapper, fontsConf, licenseAccepted ? false }:
|
2012-11-18 11:37:10 +00:00
|
|
|
|
2012-11-18 17:27:07 +00:00
|
|
|
# If you happen to use this software on the XMonad window manager, you will have issues with
|
|
|
|
# grey windows, no resizing, menus not showing and other glitches.
|
|
|
|
# This can be fixed by setting a different WM name:
|
|
|
|
# http://www.haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Using_SetWMName
|
|
|
|
|
|
|
|
if !licenseAccepted then throw ''
|
|
|
|
You have to accept the neoload EULA at
|
|
|
|
https://www.neotys.com/documents/legal/eula/neoload/eula_en.html
|
|
|
|
by setting nixpkgs config option 'neoload.accept_license = true';
|
|
|
|
''
|
|
|
|
else assert licenseAccepted;
|
2012-11-18 11:37:10 +00:00
|
|
|
|
2012-11-26 13:44:13 +00:00
|
|
|
# the installer is very picky and demands 1.7.0.07
|
2014-03-25 15:00:06 +00:00
|
|
|
let dotInstall4j = path: writeTextFile { name = "dot-install4j"; text = ''
|
2015-01-01 23:49:20 +00:00
|
|
|
JRE_VERSION ${path} 1 7 0 7
|
|
|
|
JRE_INFO ${path} 94
|
2012-11-18 11:37:10 +00:00
|
|
|
''; };
|
|
|
|
|
2012-11-18 17:27:07 +00:00
|
|
|
responseVarfile = writeTextFile { name = "response.varfile"; text = ''
|
2012-11-18 11:37:10 +00:00
|
|
|
sys.programGroupDisabled$Boolean=false
|
|
|
|
sys.component.Monitor\ Agent$Boolean=true
|
|
|
|
sys.component.Common$Boolean=true
|
|
|
|
sys.component.Controller$Boolean=true
|
|
|
|
sys.languageId=en
|
|
|
|
sys.component.Load\ Generator$Boolean=true
|
|
|
|
sys.installationTypeId=Controller
|
|
|
|
sys.installationDir=INSTALLDIR/lib/neoload
|
|
|
|
sys.symlinkDir=INSTALLDIR/bin
|
2012-11-18 17:27:07 +00:00
|
|
|
''; };
|
2012-11-18 11:37:10 +00:00
|
|
|
|
2021-06-20 10:34:30 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "neoload";
|
|
|
|
version = "4.1.4";
|
2012-11-18 11:37:10 +00:00
|
|
|
|
|
|
|
src = fetchurl (
|
2018-08-20 19:11:29 +00:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2021-06-20 10:34:30 +00:00
|
|
|
{ url = "http://neoload.installers.neotys.com/documents/download/${pname}/v${lib.versions.majorMinor version}/${pname}_${lib.replaceStrings ["."] ["_"] version}_linux_x64.sh";
|
2014-04-22 20:22:08 +00:00
|
|
|
sha256 = "199jcf5a0nwfm8wfld2rcjgq64g91vvz2bkmki8dxfzf1yasifcd"; }
|
2012-11-18 11:37:10 +00:00
|
|
|
else
|
2021-06-20 10:34:30 +00:00
|
|
|
{ url = "http://neoload.installers.neotys.com/documents/download/${pname}/v${lib.versions.majorMinor version}/${pname}_${lib.replaceStrings ["."] ["_"] version}_linux_x86.sh";
|
2014-04-22 20:22:08 +00:00
|
|
|
sha256 = "1z66jiwcxixsqqwa0f4q8m2p5kna4knq6lic8y8l74dgv25mw912"; } );
|
2012-11-18 11:37:10 +00:00
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2012-11-18 11:37:10 +00:00
|
|
|
phases = [ "installPhase" ];
|
|
|
|
|
|
|
|
# TODO: load generator / monitoring agent only builds
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-11-26 13:44:13 +00:00
|
|
|
mkdir -p $out/lib/neoload
|
|
|
|
|
2012-11-18 11:37:10 +00:00
|
|
|
# the installer wants to use its internal JRE
|
|
|
|
# disable this. The extra spaces are needed because the installer carries
|
|
|
|
# a binary payload, so should not change in size
|
|
|
|
sed -e 's/^if \[ -f jre.tar.gz/if false /' $src > installer
|
|
|
|
chmod a+x installer
|
|
|
|
|
2015-01-01 23:49:20 +00:00
|
|
|
cp ${dotInstall4j jre} .install4j
|
2012-11-18 11:37:10 +00:00
|
|
|
chmod u+w .install4j
|
|
|
|
|
|
|
|
sed -e "s|INSTALLDIR|$out|" ${responseVarfile} > response.varfile
|
|
|
|
|
|
|
|
export HOME=`pwd`
|
2015-01-01 23:49:20 +00:00
|
|
|
export INSTALL4J_JAVA_HOME=${jre.home}
|
2014-09-22 17:01:57 +00:00
|
|
|
export FONTCONFIG_FILE=${fontsConf}
|
2012-11-26 13:44:13 +00:00
|
|
|
bash -ic './installer -q -varfile response.varfile'
|
2012-11-18 11:37:10 +00:00
|
|
|
|
2014-04-22 20:22:08 +00:00
|
|
|
sed -i 's/Xmx450m/Xmx900m/;s/Xss192k/Xss384k/' $out/lib/neoload/conf/agent.properties
|
|
|
|
|
2012-11-18 11:37:10 +00:00
|
|
|
for i in $out/bin/*; do
|
2015-01-01 23:49:20 +00:00
|
|
|
wrapProgram $i --run 'cp ${dotInstall4j "${jre.home}/jre"} ~/.install4j' \
|
2012-11-18 11:37:10 +00:00
|
|
|
--run 'chmod u+w ~/.install4j'
|
|
|
|
done
|
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
for i in $out/lib/neoload/*.desktop; do
|
|
|
|
name=$(basename "$i")
|
|
|
|
sed -e 's|/lib/neoload/bin|/bin|' "$i" > "$out/share/applications/$name"
|
|
|
|
done
|
2014-03-25 15:00:06 +00:00
|
|
|
rm -r $out/lib/neoload/*.desktop $out/lib/neoload/uninstall
|
2012-11-19 09:17:26 +00:00
|
|
|
|
2012-11-18 11:37:10 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2016-06-20 10:53:46 +00:00
|
|
|
description = "Load testing software for Web applications to realistically simulate user activity and analyze server behavior";
|
2012-11-18 11:37:10 +00:00
|
|
|
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.neotys.com/product/overview-neoload.html";
|
2012-11-18 11:37:10 +00:00
|
|
|
|
2022-06-09 23:42:40 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
2012-11-18 11:37:10 +00:00
|
|
|
# https://www.neotys.com/documents/legal/eula/neoload/eula_en.html
|
2021-01-23 12:26:19 +00:00
|
|
|
license = lib.licenses.unfree;
|
2012-11-18 11:37:10 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
maintainers = [ lib.maintainers.bluescreen303 ];
|
2012-11-18 11:37:10 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|