2021-01-11 07:54:33 +00:00
|
|
|
{ fetchurl, lib, stdenv, jre, makeWrapper, coreutils }:
|
2013-10-07 02:58:24 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "jmeter";
|
2021-01-16 06:23:50 +00:00
|
|
|
version = "5.4";
|
2013-10-07 02:58:24 +01:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://archive.apache.org/dist/jmeter/binaries/apache-${pname}-${version}.tgz";
|
2021-01-16 06:23:50 +00:00
|
|
|
sha256 = "1hbyvh0hrvfvrsf7wpnwqsry5gaziac632s0bwb5zbq6y5b0z41a";
|
2013-10-07 02:58:24 +01:00
|
|
|
};
|
|
|
|
|
2021-01-16 06:23:50 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper jre ];
|
2017-12-26 19:07:32 +00:00
|
|
|
|
2013-10-07 02:58:24 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
2018-02-28 10:59:23 +00:00
|
|
|
|
|
|
|
rm bin/*.bat bin/*.cmd
|
|
|
|
|
|
|
|
cp -R * $out/
|
|
|
|
|
|
|
|
substituteInPlace $out/bin/create-rmi-keystore.sh --replace \
|
|
|
|
"keytool -genkey" \
|
|
|
|
"${jre}/lib/openjdk/jre/bin/keytool -genkey"
|
|
|
|
|
|
|
|
# Prefix some scripts with jmeter to avoid clobbering the namespace
|
|
|
|
for i in heapdump.sh mirror-server mirror-server.sh shutdown.sh stoptest.sh create-rmi-keystore.sh; do
|
|
|
|
mv $out/bin/$i $out/bin/jmeter-$i
|
|
|
|
wrapProgram $out/bin/jmeter-$i \
|
|
|
|
--prefix PATH : "${jre}/bin"
|
|
|
|
done
|
|
|
|
|
|
|
|
wrapProgram $out/bin/jmeter --set JAVA_HOME "${jre}"
|
|
|
|
wrapProgram $out/bin/jmeter.sh --set JAVA_HOME "${jre}"
|
|
|
|
'';
|
|
|
|
|
2021-01-16 06:23:50 +00:00
|
|
|
doInstallCheck = false; #NoClassDefFoundError: org/apache/logging/log4j/Level for tests
|
2018-02-28 10:59:23 +00:00
|
|
|
|
|
|
|
checkInputs = [ coreutils ];
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/jmeter --version 2>&1 | grep -q "${version}"
|
|
|
|
$out/bin/jmeter-heapdump.sh > /dev/null
|
|
|
|
$out/bin/jmeter-shutdown.sh > /dev/null
|
|
|
|
$out/bin/jmeter-stoptest.sh > /dev/null
|
|
|
|
timeout --kill=1s 1s $out/bin/jmeter-mirror-server.sh || test "$?" = "124"
|
2013-10-07 02:58:24 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "A 100% pure Java desktop application designed to load test functional behavior and measure performance";
|
2013-10-07 02:58:24 +01:00
|
|
|
longDescription = ''
|
|
|
|
The Apache JMeter desktop application is open source software, a 100%
|
|
|
|
pure Java application designed to load test functional behavior and
|
|
|
|
measure performance. It was originally designed for testing Web
|
|
|
|
Applications but has since expanded to other test functions.
|
|
|
|
'';
|
2018-02-28 10:59:23 +00:00
|
|
|
license = licenses.asl20;
|
2021-01-16 06:23:50 +00:00
|
|
|
maintainers = [ maintainers.bryanasdev000 ];
|
2013-10-07 02:58:24 +01:00
|
|
|
priority = 1;
|
2018-02-28 10:59:23 +00:00
|
|
|
platforms = platforms.unix;
|
2013-10-07 02:58:24 +01:00
|
|
|
};
|
|
|
|
}
|