nix-community / gomod2nix

Convert applications using Go modules to Nix expressions [maintainer=@adisbladis]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cross compiling don't work

yihuang opened this issue · comments

gomod2nix will pick a go version if the go parameter is missing, but that don't work with cross compiling. After specify go explicitly in buildGoApplication, it works.

/nix/store/zggnfyiminnmwz85y4z7wliq0b41lrax-go-x86_64-unknown-linux-gnu-1.18.4/bin/go: cannot execute binary file: Exec format error

The error seems suggest it runs the host version compiler.

I guess we just need to use buildPackages