1 { lib, stdenv, fetchurl, jre, makeWrapper }:
3 stdenv.mkDerivation rec {
4 pname = "jmx-prometheus-httpserver";
7 jarName = "jmx_prometheus_httpserver-${version}-jar-with-dependencies.jar";
10 url = "mirror://maven/io/prometheus/jmx/jmx_prometheus_httpserver/${version}/${jarName}";
11 sha256 = "0fr3svn8kjp7bq1wzbkvv5awylwn8b01bngj04zvk7fpzqpgs7mz";
14 nativeBuildInputs = [ makeWrapper ];
15 buildInputs = [ jre ];
22 cp $src $out/libexec/$jarName
23 makeWrapper "${jre}/bin/java" $out/bin/jmx_prometheus_httpserver --add-flags "-jar $out/libexec/$jarName"
27 homepage = "https://github.com/prometheus/jmx_exporter";
28 description = "Process for exposing JMX Beans via HTTP for Prometheus consumption";
29 mainProgram = "jmx_prometheus_httpserver";
30 sourceProvenance = with sourceTypes; [ binaryBytecode ];
31 license = licenses.asl20;
32 maintainers = [ maintainers.offline ];
33 platforms = platforms.unix;