Unfortunately, I don't really understand this. As I said, I have
zero experience with Go
I had a look at the infrastructure present in the FreeBSD ports tree, and it seems it can make use of "Go modules" in an easy way:
Code:
# GO_MODULE
# The name of the module as specified by "module" directive in go.mod.
# In most cases, this is the only requred variable for ports that
# use Go modules.
Using this, it tries to fetch modules via
https://proxy.golang.org – this URL is overridable as well. The problem I was facing was: putting
github.com/fvwmorg/FvwmPrompt
there, fetching via the proxy failed. Maybe it doesn't work because this doesn't correctly reflect the path within the repository? But this is just a guess…
The key issue is: With FreeBSD ports, the "fetch" phase is clearly separated from the "build" phase and must happen in advance. Probably to ensure completely reproducible builds. Also, network access must not be required during "build"…
Thanks for your answer!
edit: It's also unclear to me how that would work in a situation, where the
go.mod file is updated in
master, but you're trying to build from a released tarball. I guess I need to learn more about the Go ecosystem