Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

50 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
jdk,
makeWrapper,
nix-update-script,
}:
stdenv.mkDerivation rec {
pname = "async-profiler";
version = "4.1";
src = fetchFromGitHub {
owner = "jvm-profiling-tools";
repo = "async-profiler";
rev = "v${version}";
hash = "sha256-82aZK9y1Y5PaYtIG7FqnrbYU+bQ3nNzOCn+3lFzyeCA=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jdk ];
installPhase =
let
ext = stdenv.hostPlatform.extensions.sharedLibrary;
in
''
runHook preInstall
install -D build/bin/asprof "$out/bin/async-profiler"
install -D build/lib/libasyncProfiler${ext} "$out/lib/libasyncProfiler${ext}"
runHook postInstall
'';
fixupPhase = ''
wrapProgram $out/bin/async-profiler --prefix PATH : ${lib.makeBinPath [ jdk ]}
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Low overhead sampling profiler for Java that does not suffer from Safepoint bias problem";
homepage = "https://github.com/jvm-profiling-tools/async-profiler";
license = licenses.asl20;
maintainers = with maintainers; [ mschuwalow ];
platforms = platforms.all;
mainProgram = "async-profiler";
};
}