phlare: fix build (#356538)

This commit is contained in:
Aleksana 2024-11-17 18:29:51 +08:00 committed by GitHub
commit 0fdc9185d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,11 @@
{ lib, buildGoModule, fetchFromGitHub }: {
lib,
buildGoModule rec { buildGo122Module,
fetchFromGitHub,
}:
# breaks in go 1.23 with `invalid reference to runtime.aeskeysched`
# won't be fixed upstream since the repository is archived.
buildGo122Module rec {
pname = "phlare"; pname = "phlare";
version = "0.6.1"; version = "0.6.1";
@ -14,17 +19,20 @@ buildGoModule rec {
proxyVendor = true; proxyVendor = true;
vendorHash = "sha256-l7+iDT9GAP9BX+xKvnx57iVF8wCM1YyHwq6dD9PbTDI="; vendorHash = "sha256-l7+iDT9GAP9BX+xKvnx57iVF8wCM1YyHwq6dD9PbTDI=";
ldflags = let ldflags =
prefix = "github.com/grafana/phlare/pkg/util/build"; let
in [ prefix = "github.com/grafana/phlare/pkg/util/build";
"-s" "-w" in
# https://github.com/grafana/phlare/blob/v0.6.1/Makefile#L32 [
"-X ${prefix}.Version=${version}" "-s"
"-X ${prefix}.Branch=v${version}" "-w"
"-X ${prefix}.Revision=v${version}" # https://github.com/grafana/phlare/blob/v0.6.1/Makefile#L32
"-X ${prefix}.BuildUser=nix" "-X ${prefix}.Version=${version}"
"-X ${prefix}.BuildDate=1980-01-01T00:00:00Z" "-X ${prefix}.Branch=v${version}"
]; "-X ${prefix}.Revision=v${version}"
"-X ${prefix}.BuildUser=nix"
"-X ${prefix}.BuildDate=1980-01-01T00:00:00Z"
];
subPackages = [ subPackages = [
"cmd/phlare" "cmd/phlare"