44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{ lib
|
|
, buildGo122Module
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
# FIXME: update, remove this pin
|
|
buildGo122Module rec {
|
|
pname = "pyroscope";
|
|
version = "1.7.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "grafana";
|
|
repo = "pyroscope";
|
|
rev = "v${version}";
|
|
hash = "sha256-iMP67J0Q8Cgo52iImMzAM3PEkk6uLF7r6v9TyXZVaIE=";
|
|
};
|
|
|
|
env.GOWORK = "off";
|
|
|
|
vendorHash = "sha256-ggntpnU9s2rpkv6S0LnZNexrdkBsdsUrGPc93SVrK4M=";
|
|
|
|
subPackages = [ "cmd/profilecli" "cmd/pyroscope" ];
|
|
|
|
ldflags = [
|
|
"-extldflags"
|
|
"-static"
|
|
"-s"
|
|
"-w"
|
|
"-X=github.com/grafana/pyroscope/pkg/util/build.Branch=${src.rev}"
|
|
"-X=github.com/grafana/pyroscope/pkg/util/build.Version=${version}"
|
|
"-X=github.com/grafana/pyroscope/pkg/util/build.Revision=${src.rev}"
|
|
"-X=github.com/grafana/pyroscope/pkg/util/build.BuildDate=1970-01-01T00:00:00Z"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Continuous profiling platform";
|
|
homepage = "https://github.com/grafana/pyroscope";
|
|
changelog = "https://github.com/grafana/pyroscope/blob/${src.rev}/CHANGELOG.md";
|
|
license = licenses.agpl3Only;
|
|
maintainers = with maintainers; [ raitobezarius ];
|
|
mainProgram = "pyroscope";
|
|
};
|
|
}
|