gomod2nix icon indicating copy to clipboard operation
gomod2nix copied to clipboard

Make `mkVendorEnv` generate `modules.txt`

Open doronbehar opened this issue 1 year ago • 2 comments

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
 ...

doronbehar avatar Apr 12 '23 12:04 doronbehar

However, I see that buildGoApplication can replace buildGoModule, and indeed it helps cross compilation.

doronbehar avatar Apr 12 '23 15:04 doronbehar

Note: modules.txt is now required, effectively causing gomod2nix to be incompatible with go version 1.23.

obreitwi avatar Aug 30 '24 14:08 obreitwi