> An initial suspicion is that I haven't set ‘#:import-path’ as expected > in the documentation. However, all examples I can find of this are > builds from a github repository rather than a local file, so I am not > sure what it needs to be set to. > > Any clue what I could be missing?
This is exactly it. You always must supply the #:import-path in Go build system. This path is vital to the operation of the build system, as it adapts Go build environment to Guix environment. This path matches the name of the currently built module. In practice, it is the string that follows the 'module' keyword in go.mod files. I do not know the theory behind this coupling.