Building (in nix) fails when go.mod
has replace with relative URL.
(Demo project properly builds out of Nix without an issue.)
The use of replace is necessary because URL does not match actual project URL which is a monorepo and private.
Thanks to @SuperSandro2000 for finding root issue:
buildGoModule
is using go install
which does not support replace
in go.mod
.
Notice:
go install github.com/superherointj/go-barquinho-demo/src@latest
Shows same error message. So the problem is actually with go install
.