coredns: Fix cross-compile

When running go generate, an intermediate binary is built called
`directives_generate`, which will be built with whatever is defined in
GOARCH and GOOS.
This commit is contained in:
Jared Baur 2023-10-02 20:38:26 -07:00
parent 4c3e787f47
commit c10a190986
No known key found for this signature in database

View file

@ -33,7 +33,7 @@ in buildGoModule rec {
modBuildPhase = ''
for plugin in ${builtins.toString (attrsToPlugins externalPlugins)}; do echo $plugin >> plugin.cfg; done
for src in ${builtins.toString (attrsToSources externalPlugins)}; do go get $src; done
go generate
GOOS= GOARCH= go generate
go mod vendor
'';
@ -46,7 +46,7 @@ in buildGoModule rec {
chmod -R u+w vendor
mv -t . vendor/go.{mod,sum} vendor/plugin.cfg
go generate
GOOS= GOARCH= go generate
'';
postPatch = ''