nix-community / gomod2nix

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

panic: error generating pkgs #172

Open tim-goto opened 2 weeks ago

tim-goto commented 2 weeks ago

Hey, thanks for the great tool :) Unfortunately I have an issue creating the toml file for this repo. To reproduce:

git clone https://github.com/veertuinc/anklet.git
pushd anklet
nix shell github:nix-community/gomod2nix
gomod2nix generate

results in this output:

INFO[0000] Parsing go.mod                                modPath=go.mod
INFO[0000] Downloading dependencies
panic: error generating pkgs: exit status 1

goroutine 1 [running]:
github.com/nix-community/gomod2nix/internal/cmd.generateFunc(0xb23dc0?, {0xb5a2c8?, 0x0?, 0x0?})
        /build/source/internal/cmd/root.go:67 +0x416
github.com/spf13/cobra.(*Command).execute(0xb23dc0, {0xb5a2c8, 0x0, 0x0})
        /build/source/vendor/github.com/spf13/cobra/command.go:987 +0xaa7
github.com/spf13/cobra.(*Command).ExecuteC(0xb23ae0)
        /build/source/vendor/github.com/spf13/cobra/command.go:1115 +0x417
github.com/spf13/cobra.(*Command).Execute(...)
        /build/source/vendor/github.com/spf13/cobra/command.go:1039
github.com/nix-community/gomod2nix/internal/cmd.Execute()
        /build/source/internal/cmd/root.go:124 +0x25
main.main()
        /build/source/main.go:6 +0x17

do you have any idea what might be wrong here? Thanks!

EDIT: I have checked the other issues I could find for this error but the patch version is defined in the go.mod and everything else wasn't applicable

JackoCoolio commented 2 days ago

This flake is pretty outdated (nix flake update was last run two years ago) so the go version that it uses to download dependencies is 1.18.4, which has this issue. #143 updates the flake inputs and has been ready to merge for 10 months - @marcusramberg, could that be merged (and updated again since it's 10 months old)?