pyroscope: address review feedback

This commit is contained in:
jkachmar
2025-06-17 23:51:33 -04:00
parent 64bb4f9bf1
commit 6fb2de9213
+19 -1
View File
@@ -1,7 +1,10 @@
{
stdenv,
buildGoModule,
lib,
fetchFromGitHub,
versionCheckHook,
installShellFiles,
nix-update-script,
...
}:
@@ -32,10 +35,25 @@ buildGoModule (finalAttrs: {
"-X=github.com/grafana/pyroscope/pkg/util/build.BuildDate=1970-01-01T00:00:00Z"
];
# We're overriding the version in 'ldFlags', so we should check that the
# derivation 'version' string is found in 'pyroscope --version'.
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}";
versionCheckProgramArg = "--version";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd pyroscope \
--bash <($out/bin/pyroscope completion bash) \
--fish <($out/bin/pyroscope completion fish) \
--zsh <($out/bin/pyroscope completion zsh)
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Continuous Profiling Platform. Debug performance issues down to a single line of code";
description = "Continuous profiling platform; debug performance issues down to a single line of code";
homepage = "https://github.com/grafana/pyroscope";
changelog = "https://github.com/grafana/pyroscope/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.agpl3Only;