The go-build-system is slightly more appropriate, and switching resolves an
issue with combining the 'unpack phase from the gnu-build-system, and the
'setup-go-environment from the go-build-system. With both of those phases
creating a directory, the first-subdirectory call at the end of the 'unpack
phase can return different values depending on the filesystem ordering.
* gnu/packages/shellutils.scm (direnv)[source]: Use the git repository, as
this works better with the go-build-system.
[build-system]: Change to the go-build-system.
[arguments]: Adjust for the go-build-system.
[native-inputs]: Remove go.
In the long run, it would be good to move direnv across to the
go-build-system, and update the package, but these changes do succeed in
reducing the closure size a lot.
Thanks to Tanguy Le Carrour for raising this issue on guix-devel.
* gnu/packages/shellutils.scm (direnv)[arguments]: Include the
remove-go-references phase from the go-build-system.
[inputs,native-inputs]: Move all inputs to native-inputs, as these are no
longer referenced in the output.
This basically changes (guix build-system go) so that instead of looking
up its dependencies in a list of directories in $GOPATH, all the
Go dependencies are symlinked into a single directory.
Fixes <https://bugs.gnu.org/33620>.
* guix/build/go-build-system.scm (setup-go-environment): New variable.
(setup-environment, install-source): Remove variables.
(unpack): Unpack the source relative to $GOPATH.
(install): Do not install the compiled objects in the 'pkg' directory.
Install the source code in this phase, and only install the source of
the package named by IMPORT-PATH.
* doc/guix.texi (Build Systems): Adjust accordingly.
* gnu/packages/docker.scm (docker): Import (guix build union) on the build side
and adjust to build phase name changes in (guix build-system go).
* gnu/packages/shellutils.scm (direnv): Likewise.
* gnu/packages/databases.scm (mongo-tools)[arguments]:
Set '#:install-source #f'.
* gnu/packages/music.scm (demlo)[arguments]: Move the 'install-scripts'
phase after the 'install' phase.
* gnu/packages/shellutils.scm (direnv): Update to 2.15.2.
[inputs]: Use the default Go compiler. Add go-github-com-burntsushi-toml
and go-github-com-direnv-go-dotenv.
[arguments]: Add a 'setup-go-environment' phase.