aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/ipfs.scm28
1 files changed, 20 insertions, 8 deletions
diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm
index 706015b633..3c3604902b 100644
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -857,15 +857,27 @@ their levels to be controlled individually.")
#:import-path "github.com/libp2p/go-libp2p"
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'fix-embed-go-libp2p-asn-util
+ ;; 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 _
- (delete-file
- "src/github.com/libp2p/go-libp2p-asn-util/sorted-network-list.bin")
- (copy-file
- (string-append
- #$(this-package-input "go-github-com-libp2p-go-libp2p-asn-util")
- "/src/github.com/libp2p/go-libp2p-asn-util/sorted-network-list.bin")
- "src/github.com/libp2p/go-libp2p-asn-util/sorted-network-list.bin"))))))
+ (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"
+ "|sorted-network-list.bin)$"))))))))
(propagated-inputs
(list go-github-com-benbjohnson-clock
go-github-com-davidlazar-go-crypto