nix-community / gomod2nix

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`gomod2nix generate` fails

DearRude opened this issue · comments

Describe the bug
gomod2nix generate or gomod2nix import fails when Prometheus go client is in dependencies.

To Reproduce

nix flake init -t github:tweag/gomod2nix#app
go get github.com/prometheus/client_golang
gomod2nix generate

Expected behavior
gomod2nix.toml is expected to be generated/

Environment

  • OS name + version: NixOS 22.05
  • Version of the code: latest

Additional context
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/tweag/gomod2nix/internal/cmd.generateFunc(0xafd160, {0xb333e0, 0x0, 0x0})
	/build/source/internal/cmd/root.go:67 +0x416
github.com/spf13/cobra.(*Command).execute(0xafd160, {0xb333e0, 0x0, 0x0})
	/build/source/vendor/github.com/spf13/cobra/command.go:860 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0xafcee0)
	/build/source/vendor/github.com/spf13/cobra/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
	/build/source/vendor/github.com/spf13/cobra/command.go:902
github.com/tweag/gomod2nix/internal/cmd.Execute()
	/build/source/internal/cmd/root.go:124 +0x25
main.main()
	/build/source/main.go:6 +0x17

Sorry I could not reproduce your issue, is there any more context you could provide?
Could you try again to see if it was just a transient issue on your side?

Sorry for the bother. I was using an old version of the flake.