mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
build-system/go: Build with a filesystem union of Go dependencies.
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.
This commit is contained in:
parent
5a14b913ad
commit
e3900a4d64
7 changed files with 90 additions and 72 deletions
|
@ -249,9 +249,11 @@ network attachments.")
|
|||
`(#:modules
|
||||
((guix build gnu-build-system)
|
||||
((guix build go-build-system) #:prefix go:)
|
||||
(guix build union)
|
||||
(guix build utils))
|
||||
#:imported-modules
|
||||
(,@%gnu-build-system-modules
|
||||
(guix build union)
|
||||
(guix build go-build-system))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
|
@ -412,8 +414,8 @@ network attachments.")
|
|||
;; Make build faster
|
||||
(setenv "GOCACHE" "/tmp")
|
||||
#t))
|
||||
(add-before 'build 'setup-environment
|
||||
(assoc-ref go:%standard-phases 'setup-environment))
|
||||
(add-before 'build 'setup-go-environment
|
||||
(assoc-ref go:%standard-phases 'setup-go-environment))
|
||||
(replace 'build
|
||||
(lambda _
|
||||
;; Our LD doesn't like the statically linked relocatable things
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue