coredns: fix cross

For some reason, go generate attempts to pull in the C compiler
available in the environment. Setting CC to empty fixes the build when
cross-compiling, since running the intermediate executables `go
generate` creates would not work when using a C compiler build for the
wrong architecture.
This commit is contained in:
Jared Baur
2025-12-02 08:58:12 -08:00
parent 684b4498ea
commit 027c3c99a9
+2 -2
View File
@@ -76,7 +76,7 @@ buildGoModule (finalAttrs: {
}
diff -u plugin.cfg.orig plugin.cfg || true
for src in ${toString (attrsToSources externalPlugins)}; do go get $src; done
GOOS= GOARCH= go generate
CC= GOOS= GOARCH= go generate
go mod tidy
go mod vendor
'';
@@ -90,7 +90,7 @@ buildGoModule (finalAttrs: {
chmod -R u+w vendor
mv -t . vendor/go.{mod,sum} vendor/plugin.cfg
GOOS= GOARCH= go generate
CC= GOOS= GOARCH= go generate
'';
postPatch = ''