From 0431a90dd6b25f2088758ba94a34f86d1c506dfd Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Sat, 16 Nov 2024 19:34:57 +0100 Subject: [PATCH 1/2] phlare: format using nixfmt (cherry picked from commit 7e91f3884709d42cf385ca851afa4cf178240fc3) --- pkgs/by-name/ph/phlare/package.nix | 31 ++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/ph/phlare/package.nix b/pkgs/by-name/ph/phlare/package.nix index b1290953a852..57145610ffdb 100644 --- a/pkgs/by-name/ph/phlare/package.nix +++ b/pkgs/by-name/ph/phlare/package.nix @@ -1,4 +1,8 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ + lib, + buildGoModule, + fetchFromGitHub, +}: buildGoModule rec { pname = "phlare"; @@ -14,17 +18,20 @@ buildGoModule rec { proxyVendor = true; vendorHash = "sha256-l7+iDT9GAP9BX+xKvnx57iVF8wCM1YyHwq6dD9PbTDI="; - ldflags = let - prefix = "github.com/grafana/phlare/pkg/util/build"; - in [ - "-s" "-w" - # https://github.com/grafana/phlare/blob/v0.6.1/Makefile#L32 - "-X ${prefix}.Version=${version}" - "-X ${prefix}.Branch=v${version}" - "-X ${prefix}.Revision=v${version}" - "-X ${prefix}.BuildUser=nix" - "-X ${prefix}.BuildDate=1980-01-01T00:00:00Z" - ]; + ldflags = + let + prefix = "github.com/grafana/phlare/pkg/util/build"; + in + [ + "-s" + "-w" + # https://github.com/grafana/phlare/blob/v0.6.1/Makefile#L32 + "-X ${prefix}.Version=${version}" + "-X ${prefix}.Branch=v${version}" + "-X ${prefix}.Revision=v${version}" + "-X ${prefix}.BuildUser=nix" + "-X ${prefix}.BuildDate=1980-01-01T00:00:00Z" + ]; subPackages = [ "cmd/phlare" From 9697838ddcb3a7b64e16fd5ef25fc1aa5007ed5e Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Sat, 16 Nov 2024 19:41:25 +0100 Subject: [PATCH 2/2] phlare: fix build (cherry picked from commit 7cc6a148e8c59c199497425ced46501053ce8082) --- pkgs/by-name/ph/phlare/package.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ph/phlare/package.nix b/pkgs/by-name/ph/phlare/package.nix index 57145610ffdb..96c1a33fa74b 100644 --- a/pkgs/by-name/ph/phlare/package.nix +++ b/pkgs/by-name/ph/phlare/package.nix @@ -1,10 +1,11 @@ { lib, - buildGoModule, + buildGo122Module, fetchFromGitHub, }: - -buildGoModule rec { +# 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"; version = "0.6.1";