Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6stdenv.mkDerivation ( 7 finalAttrs: 8 let 9 jarName = "jmx_prometheus_javaagent-${finalAttrs.version}.jar"; 10 in 11 { 12 pname = "jmx-prometheus-javaagent"; 13 version = "1.0.1"; 14 src = fetchurl { 15 url = "mirror://maven/io/prometheus/jmx/jmx_prometheus_javaagent/${finalAttrs.version}/${jarName}"; 16 hash = "sha256-fWH3N/1mFhDMwUrqeXZPqh6pSjQMvI8AKbPS7eo9gME="; 17 }; 18 19 dontUnpack = true; 20 21 installPhase = '' 22 env 23 mkdir -p $out/lib 24 cp $src $out/lib/${jarName} 25 ''; 26 27 meta = { 28 homepage = "https://github.com/prometheus/jmx_exporter"; 29 description = "Process for exposing JMX Beans via HTTP for Prometheus consumption"; 30 sourceProvenance = [ lib.sourceTypes.binaryBytecode ]; 31 license = lib.licenses.asl20; 32 maintainers = [ lib.maintainers.srhb ]; 33 platforms = lib.platforms.unix; 34 }; 35 } 36)