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:
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user