Hi Guix! I had a courage to refresh the default Goang version to build packages from 1.17 to 1.21 as all version before it are already EoL. After rebuilt 900+ packages locally I've fixed some failing to build packages.
The packages in golang-build were refresh as well which involve to
rebuild about 1000+ packages depending on them.
The changes are pushed to go-team brunch to check any other failures.
My plan is to continue shifting packages from golang.scm to dedicated
submodules which may boost maintainability of Golang ecosystem.
I'd like to highlight a "feature" of the `go:embedded` build option
which fails to archive during build without this hack:
--8<---------------cut here---------------start------------->8---
;; FIXME: Pattern embedded: cannot embed directory embedded:
;; contains no embeddable files.
;;
;; This happens due to Golang can't determine the valid directory of
;; the module which is sourced during setup environment phase, but
;; easy resolved after coping to expected directory "vendor" within
;; the current package, see details in Golang source:
;;
;; - URL: <https://github.com/golang/go/blob/>
;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
;; - file: src/cmd/go/internal/load/pkg.go#L2059
(add-before 'build 'copy-input-to-vendor-directory
(lambda* (#:key import-path #:allow-other-keys)
(with-directory-excursion (string-append "src/" import-path)
(mkdir "vendor")
(copy-recursively
(string-append
#$(this-package-native-input
"go-github-com-charmbracelet-glamour")
"/src/github.com")
"vendor/github.com")
(copy-recursively
(string-append
#$(this-package-native-input
"go-github-com-alecthomas-chroma-v2")
"/src/github.com")
"vendor/github.com"))))
(add-before 'install 'remove-vendor-directory
(lambda* (#:key import-path #:allow-other-keys)
(with-directory-excursion (string-append "src/" import-path)
(delete-file-recursively "vendor")))))))
--8<---------------cut here---------------end--------------->8---
It might need some adjustment to go-build-system.
Related issues:
- https://issues.guix.gnu.org/71011
--
Oleg
signature.asc
Description: PGP signature
