mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
parent
8fe5c2b8c7
commit
11de4cf6ef
@ -1,22 +1,50 @@
|
|||||||
{ fetchurl, stdenv, jre }:
|
{ fetchurl, stdenv, jre, makeWrapper, coreutils }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "jmeter-3.3";
|
name = "jmeter-${version}";
|
||||||
|
version = "4.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://archive.apache.org/dist/jmeter/binaries/apache-${name}.tgz";
|
url = "http://archive.apache.org/dist/jmeter/binaries/apache-${name}.tgz";
|
||||||
sha256 = "190k6yrh5casadphkv4azp4nvf4wf2q85mrfysw67r9d96nb9kk5";
|
sha256 = "1dvngvi6j8qb6nmf5a3gpi5wxck4xisj41qkrj8sjwb1f8jq6nw4";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ jre ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
substituteInPlace ./bin/jmeter.sh --replace "java $ARGS" "${jre}/bin/java $ARGS"
|
|
||||||
substituteInPlace ./bin/jmeter --replace "java $ARGS" "${jre}/bin/java $ARGS"
|
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp ./* $out/ -R
|
|
||||||
|
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}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
doInstallCheck = true;
|
||||||
|
|
||||||
|
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"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
description = "A 100% pure Java desktop application designed to load test functional behavior and measure performance";
|
description = "A 100% pure Java desktop application designed to load test functional behavior and measure performance";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
The Apache JMeter desktop application is open source software, a 100%
|
The Apache JMeter desktop application is open source software, a 100%
|
||||||
@ -24,9 +52,9 @@ stdenv.mkDerivation rec {
|
|||||||
measure performance. It was originally designed for testing Web
|
measure performance. It was originally designed for testing Web
|
||||||
Applications but has since expanded to other test functions.
|
Applications but has since expanded to other test functions.
|
||||||
'';
|
'';
|
||||||
license = stdenv.lib.licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = [ stdenv.lib.maintainers.garbas ];
|
maintainers = [ maintainers.garbas ];
|
||||||
priority = 1;
|
priority = 1;
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user