k3s: fix cross compilation

This commit is contained in:
Nick Cao 2022-09-20 14:17:58 +08:00
parent f802caee6a
commit 6a3d7aeb8e
No known key found for this signature in database

View File

@ -22,6 +22,7 @@
, zstd
, yq-go
, nixosTests
, pkgsBuildBuild
}:
with lib;
@ -240,7 +241,11 @@ buildGoModule rec {
substituteInPlace scripts/package-cli \
--replace '"''${GO}" generate' \
'GOFLAGS="" "''${GO}" generate'
'GOFLAGS="" \
GOOS="${pkgsBuildBuild.go.GOOS}" \
GOARCH="${pkgsBuildBuild.go.GOARCH}" \
CC="${pkgsBuildBuild.stdenv.cc}/bin/cc" \
"''${GO}" generate'
'';
# Important utilities used by the kubelet, see