jmeter: 3.3 -> 4.0 (#35655)

* jmeter: 3.3 -> 4.0

authored by Markus Hauck and committed by Jörg Thalheim 11de4cf6 8fe5c2b8

+39 -11
+39 -11
pkgs/applications/networking/jmeter/default.nix
··· 1 - { fetchurl, stdenv, jre }: 2 3 stdenv.mkDerivation rec { 4 - name = "jmeter-3.3"; 5 src = fetchurl { 6 url = "http://archive.apache.org/dist/jmeter/binaries/apache-${name}.tgz"; 7 - sha256 = "190k6yrh5casadphkv4azp4nvf4wf2q85mrfysw67r9d96nb9kk5"; 8 }; 9 10 - buildInputs = [ jre ]; 11 12 installPhase = '' 13 - substituteInPlace ./bin/jmeter.sh --replace "java $ARGS" "${jre}/bin/java $ARGS" 14 - substituteInPlace ./bin/jmeter --replace "java $ARGS" "${jre}/bin/java $ARGS" 15 mkdir $out 16 - cp ./* $out/ -R 17 ''; 18 19 - meta = { 20 description = "A 100% pure Java desktop application designed to load test functional behavior and measure performance"; 21 longDescription = '' 22 The Apache JMeter desktop application is open source software, a 100% ··· 24 measure performance. It was originally designed for testing Web 25 Applications but has since expanded to other test functions. 26 ''; 27 - license = stdenv.lib.licenses.asl20; 28 - maintainers = [ stdenv.lib.maintainers.garbas ]; 29 priority = 1; 30 - platforms = stdenv.lib.platforms.unix; 31 }; 32 }
··· 1 + { fetchurl, stdenv, jre, makeWrapper, coreutils }: 2 3 stdenv.mkDerivation rec { 4 + name = "jmeter-${version}"; 5 + version = "4.0"; 6 src = fetchurl { 7 url = "http://archive.apache.org/dist/jmeter/binaries/apache-${name}.tgz"; 8 + sha256 = "1dvngvi6j8qb6nmf5a3gpi5wxck4xisj41qkrj8sjwb1f8jq6nw4"; 9 }; 10 11 + nativeBuildInputs = [ makeWrapper ]; 12 13 installPhase = '' 14 mkdir $out 15 + 16 + rm bin/*.bat bin/*.cmd 17 + 18 + cp -R * $out/ 19 + 20 + substituteInPlace $out/bin/create-rmi-keystore.sh --replace \ 21 + "keytool -genkey" \ 22 + "${jre}/lib/openjdk/jre/bin/keytool -genkey" 23 + 24 + # Prefix some scripts with jmeter to avoid clobbering the namespace 25 + for i in heapdump.sh mirror-server mirror-server.sh shutdown.sh stoptest.sh create-rmi-keystore.sh; do 26 + mv $out/bin/$i $out/bin/jmeter-$i 27 + wrapProgram $out/bin/jmeter-$i \ 28 + --prefix PATH : "${jre}/bin" 29 + done 30 + 31 + wrapProgram $out/bin/jmeter --set JAVA_HOME "${jre}" 32 + wrapProgram $out/bin/jmeter.sh --set JAVA_HOME "${jre}" 33 ''; 34 35 + doInstallCheck = true; 36 + 37 + checkInputs = [ coreutils ]; 38 + 39 + installCheckPhase = '' 40 + $out/bin/jmeter --version 2>&1 | grep -q "${version}" 41 + $out/bin/jmeter-heapdump.sh > /dev/null 42 + $out/bin/jmeter-shutdown.sh > /dev/null 43 + $out/bin/jmeter-stoptest.sh > /dev/null 44 + timeout --kill=1s 1s $out/bin/jmeter-mirror-server.sh || test "$?" = "124" 45 + ''; 46 + 47 + meta = with stdenv.lib; { 48 description = "A 100% pure Java desktop application designed to load test functional behavior and measure performance"; 49 longDescription = '' 50 The Apache JMeter desktop application is open source software, a 100% ··· 52 measure performance. It was originally designed for testing Web 53 Applications but has since expanded to other test functions. 54 ''; 55 + license = licenses.asl20; 56 + maintainers = [ maintainers.garbas ]; 57 priority = 1; 58 + platforms = platforms.unix; 59 }; 60 }