gomod2nix
gomod2nix copied to clipboard
Make `mkVendorEnv` generate `modules.txt`
So to my understanding, this package emulates go mod vendor. However, in order to use the vendor directory with buildGoModule (see #116), the modules.txt file is required:
go: inconsistent vendoring in /build/source:
github.com/adrg/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
github.com/alecthomas/chroma/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
...
However, I see that buildGoApplication can replace buildGoModule, and indeed it helps cross compilation.
Note: modules.txt is now required, effectively causing gomod2nix to be incompatible with go version 1.23.