Describe the bug
gomod2nix seems to struggle with go dependencies that are part of the repo and referenced by relative paths. When I try and package regen-network I am getting this error:
app/app.go:10:2: cannot find package "." in:
/build/source/vendor/github.com/regen-network/regen-ledger/types/module
app/app.go:95:2: cannot find package "." in:
/build/source/vendor/github.com/regen-network/regen-ledger/types/module/server
app/app.go:96:2: cannot find package "." in:
/build/source/vendor/github.com/regen-network/regen-ledger/x/ecocredit
app/app.go:11:2: cannot find package "." in:
/build/source/vendor/github.com/regen-network/regen-ledger/x/ecocredit/module
The issue seems to be with these dependencies. The relevant error sites are listed below:
I also think that this has something to do with the local replace directives here
To Reproduce
I created a repro repo here. You should just have to run nix build to get the error. Since the repo is a flake you can just run nix build github:JonathanLorimer/gomod-repro-1 without even cloning the repo.
Expected behavior
I expected this module to build without errors
Environment
- OS name + version:
NixOS 21.11 (Porcupine) x86_64
- Version of the code:
67f22dd738d092c6ba88e420350ada0ed4992ae8
Additional context
I have very limited golang knowledge so there might be something completely wrong with the go side of things and I am just missing it. Thank you for your help in advance!
Describe the bug
gomod2nix seems to struggle with go dependencies that are part of the repo and referenced by relative paths. When I try and package regen-network I am getting this error:
The issue seems to be with these dependencies. The relevant error sites are listed below:
I also think that this has something to do with the local replace directives here
To Reproduce
I created a repro repo here. You should just have to run
nix buildto get the error. Since the repo is a flake you can just runnix build github:JonathanLorimer/gomod-repro-1without even cloning the repo.Expected behavior
I expected this module to build without errors
Environment
NixOS 21.11 (Porcupine) x86_6467f22dd738d092c6ba88e420350ada0ed4992ae8Additional context
I have very limited golang knowledge so there might be something completely wrong with the go side of things and I am just missing it. Thank you for your help in advance!