nix-community / gomod2nix

Convert applications using Go modules to Nix expressions [maintainer=@marcusramberg]
MIT License
240 stars 59 forks source link

Make `mkVendorEnv` generate `modules.txt` #117

Open doronbehar opened 1 year ago

doronbehar commented 1 year ago

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/xdg@v0.4.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
    github.com/alecthomas/chroma/v2@v2.7.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
 ...
doronbehar commented 1 year ago

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

obreitwi commented 3 months ago

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