2021-01-15 22:18:51 +00:00
|
|
|
{ fetchurl, lib, stdenv, jre, makeWrapper, coreutils }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jmeter";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "5.6.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://archive.apache.org/dist/jmeter/binaries/apache-${pname}-${version}.tgz";
|
2024-01-13 08:15:51 +00:00
|
|
|
sha256 = "sha256-9o78F/4GD2mMSKar4lmakzknSGvaKSTb4Ux0iVMY3d4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper jre ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
|
|
|
|
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-02-05 17:12:51 +00:00
|
|
|
doInstallCheck = false; #NoClassDefFoundError: org/apache/logging/log4j/Level for tests
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ coreutils ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "100% pure Java desktop application designed to load test functional behavior and measure performance";
|
2020-04-24 23:36:52 +00: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.
|
|
|
|
'';
|
|
|
|
license = licenses.asl20;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = [ maintainers.bryanasdev000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
priority = 1;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|