[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
39/172: gnu: go-github-com-dgraph-io-badger: Fix build.
From: |
guix-commits |
Subject: |
39/172: gnu: go-github-com-dgraph-io-badger: Fix build. |
Date: |
Mon, 21 Oct 2024 17:30:27 -0400 (EDT) |
sharlatan pushed a commit to branch go-team
in repository guix.
commit 470acb72adf697a7e5bce2ada7eabc0ca34e7e93
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Fri Sep 13 14:48:49 2024 +0100
gnu: go-github-com-dgraph-io-badger: Fix build.
* gnu/packages/golang-xyz.scm (go-github-com-dgraph-io-badger): Fix build.
[arguments]: <#:phases>: Add 'fix-embed-files; remove
'disable-failing-tests in favor of "-skip" test option.
Change-Id: Ib4d91509a0c6a83c8108a47ae2bd6254df53b430
---
gnu/packages/golang-xyz.scm | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index f6b7493464..66d504105f 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -2054,6 +2054,25 @@ encoding/decoding. It has no dependencies.")
#:import-path "github.com/dgraph-io/badger"
#:phases
#~(modify-phases %standard-phases
+ ;; TODO: Implement it in go-build-system.
+ ;;
+ ;; This happens due to Golang can't determine the valid directory of
+ ;; the module of embed file which is symlinked during setup
+ ;; environment phase, but easy resolved after coping file from the
+ ;; store to the build directory of 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-after 'unpack 'fix-embed-files
+ (lambda _
+ (for-each (lambda (file)
+ (let ((file-store-path (readlink file)))
+ (delete-file file)
+ (copy-recursively file-store-path file)))
+ (find-files "src" (string-append
+ ".*(editions_defaults.binpb)$")))))
(add-after 'unpack 'patch-failing-tests
(lambda* (#:key unpack-path tests? #:allow-other-keys)
(with-directory-excursion (string-append "src/" unpack-path)
@@ -2064,18 +2083,14 @@ encoding/decoding. It has no dependencies.")
;; See: <https://github.com/dgraph-io/badger/issues/2103>.
(("\"testing\"") (string-append "\"testing\"\n\"fmt\""))
(("string") "fmt.Sprint")))))
- (add-after 'patch-failing-tests 'disable-failing-tests
- (lambda* (#:key tests? import-path #:allow-other-keys)
- (with-directory-excursion (string-append "src/" import-path)
- (substitute* (find-files "." "\\_test.go$")
- (("TestBuildKeyValueSizeHistogram")
- "OffTestBuildKeyValueSizeHistogram")))))
;; XXX: Replace when go-build-system supports nested path.
(replace 'check
(lambda* (#:key import-path tests? #:allow-other-keys)
(when tests?
(with-directory-excursion (string-append "src/" import-path)
- (invoke "go" "test" "-v" "./..."))))))))
+ (invoke "go" "test" "-v"
+ "-skip" "TestBuildKeyValueSizeHistogram"
+ "./..." ))))))))
(native-inputs
(list go-github-com-stretchr-testify))
(propagated-inputs
- 25/172: gnu: go-golang-org-x-mod: Update to 0.21.0., (continued)
- 25/172: gnu: go-golang-org-x-mod: Update to 0.21.0., guix-commits, 2024/10/21
- 35/172: gnu: go-github-com-golang-groupcache: Update to 0.0.0-20210331224755-41bb18bfe9da., guix-commits, 2024/10/21
- 32/172: gnu: go-google-golang-org-protobuf: Update to 1.34.2., guix-commits, 2024/10/21
- 09/172: gnu: Add go-html2text., guix-commits, 2024/10/21
- 19/172: gnu: go-1.20: Build with gccgo-12 on some systems., guix-commits, 2024/10/21
- 12/172: gnu: Add go-github-com-deckarep-golang-set-v2., guix-commits, 2024/10/21
- 34/172: gnu: go-google-golang-org-protobuf: Enable all tests, guix-commits, 2024/10/21
- 41/172: gnu: go-github-com-prometheus-client-golang: Fix build., guix-commits, 2024/10/21
- 28/172: gnu: go-golang-org-x-term: Update to 0.24.0., guix-commits, 2024/10/21
- 52/172: gnu: go-mvdan-cc-xurls: Rename variable., guix-commits, 2024/10/21
- 39/172: gnu: go-github-com-dgraph-io-badger: Fix build.,
guix-commits <=
- 31/172: gnu: go-golang-org-x-xerrors: Fix indentation., guix-commits, 2024/10/21
- 60/172: gnu: go-github-com-sergi-go-diff: Update to 1.3.1., guix-commits, 2024/10/21
- 30/172: gnu: go-golang-org-x-xerrors: Update to 0.0.0-20200804184101-5ec99f83aff1., guix-commits, 2024/10/21
- 70/172: gnu: go-github-com-jonboulle-clockwork: Fix indentation., guix-commits, 2024/10/21
- 75/172: gnu: go-github-com-google-gopacket: Move to golang-web., guix-commits, 2024/10/21
- 89/172: gnu: go-github-com-go-git-go-git-v5: Update style., guix-commits, 2024/10/21
- 13/172: gnu: Remove go-github-com-kyoh86-xdg., guix-commits, 2024/10/21
- 24/172: gnu: go-golang-org-x-image: Update to 0.20.0., guix-commits, 2024/10/21
- 27/172: gnu: go-golang-org-x-sys: Update to 0.25.0., guix-commits, 2024/10/21
- 38/172: gnu: go-github-com-libp2p-go-msgio: Fix build., guix-commits, 2024/10/21