prometheus: fix cross-build

This commit is contained in:
Philippe Hürlimann
2025-12-10 00:46:11 +01:00
parent 3834afe37f
commit 4efbf55459
+6 -1
View File
@@ -1,5 +1,6 @@
{
stdenv,
buildPackages,
lib,
go,
buildGoModule,
@@ -48,6 +49,8 @@ buildGoModule (finalAttrs: {
hash = "sha256-hRuZxwPPDLxQvy5MPKEyfmanNabcSjLRO+XbNKugPtk=";
};
depsBuildBuild = [ buildPackages.stdenv.cc ];
vendorHash = "sha256-5wDaG01vcTtGzrS/S33U5XWXoSWM+N9z3dzXZlILxD8=";
webUiStatic = fetchurl {
@@ -96,7 +99,9 @@ buildGoModule (finalAttrs: {
'';
preBuild = ''
if [[ -d vendor ]]; then GOARCH= make -o assets assets-compress plugins; fi
if [[ -d vendor ]]; then
GOARCH= CC="$CC_FOR_BUILD" LD="$LD_FOR_BUILD" make -o assets assets-compress plugins
fi
'';
tags = [ "builtinassets" ];