[bug#67570] gnu: kubo: Fix build.
Commit Message
Hello,
this patch series fixes Kubo build.
- avp
Comments
Hi,
I spoke too fast…
"Artyom V. Poptsov" <poptsov.artyom@gmail.com> skribis:
> + (let ((p (package-input-rewriting
> + `((,go-golang-org-x-sys . ,go-golang-org-x-sys-0.8))
> + #:deep? #true)))
> + (cons go-golang-org-x-sys-0.8
> + (map p
> + (list go-github-com-alecthomas-units
> + ;; TODO: needs to be updated first
> + ;; go-github-com-blang-semver
> + go-github-com-cespare-xxhash
It does fix the build, but it’s a bit heavy-handed: every time we
compute the kubo derivation, we go through that graph rewriting, which
is quite expensive.
Can you think of another way this could be fixed? What if we don’t
replace go-golang-org-x-sys everywhere? Or perhaps there’s a trick that
would allow us to build with go-golang-org-x-sys 0.4?
In parallel perhaps we should work on upgrading go-golang-org-x-sys
altogether?
WDYT?
Ludo’.
From b59bf490b31798ef88220ddb54a285e14c82f00d Mon Sep 17 00:00:00 2001
Message-ID: <b59bf490b31798ef88220ddb54a285e14c82f00d.1701457354.git.poptsov.artyom@gmail.com>
In-Reply-To: <745aa270dcfd400d34eb39f7e719985c34d79788.1701457354.git.poptsov.artyom@gmail.com>
References: <745aa270dcfd400d34eb39f7e719985c34d79788.1701457354.git.poptsov.artyom@gmail.com>
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Fri, 1 Dec 2023 22:02:11 +0300
Subject: [PATCH 2/2] gnu: kubo: Fix the package style.
* gnu/packages/ipfs.scm (kubo): Fix the package style.
Change-Id: Ifbb4fca12c7e52b9f07fb3c430e0dc61848fd101
---
gnu/packages/ipfs.scm | 166 +++++++++++++++++++++---------------------
1 file changed, 82 insertions(+), 84 deletions(-)
@@ -226,9 +226,8 @@ (define-public kubo
(source
(origin
(method url-fetch/tarbomb)
- (uri (string-append
- "https://dist.ipfs.io/kubo/v" version
- "/kubo-source.tar.gz"))
+ (uri (string-append "https://dist.ipfs.io/kubo/v" version
+ "/kubo-source.tar.gz"))
(sha256
(base32 "0ss5k8xnzn9qk977dni5ja89yygcysdw7r3mdk67cac2dpa9hhqs"))
(file-name (string-append name "-" version "-source"))
@@ -285,89 +284,88 @@ (define-public kubo
(list
#:unpack-path "github.com/ipfs/kubo"
#:import-path "github.com/ipfs/kubo/cmd/ipfs"
- #:phases
- #~(modify-phases %standard-phases
- ;; https://github.com/ipfs/kubo/blob/master/docs/command-completion.md
- (add-after 'install 'install-bashcompletion
- (lambda _
- (let ((completiondir (string-append #$output
- "/etc/bash_completion.d")))
- (mkdir-p completiondir)
- (with-output-to-file (string-append completiondir "/ipfs")
- (lambda _
- (invoke #$(if (%current-target-system)
- "ipfs"
- #~(string-append #$output "/bin/ipfs"))
- "commands" "completion" "bash")))))))))
- (inputs
- (let ((p (package-input-rewriting
- `((,go-golang-org-x-sys . ,go-golang-org-x-sys-0.8))
- #:deep? #true)))
- (cons go-golang-org-x-sys-0.8
- (map p
- (list go-github-com-alecthomas-units
- ;; TODO: needs to be updated first
- ;; go-github-com-blang-semver
- go-github-com-cespare-xxhash
- go-github-com-cheekybits-genny
- go-github-com-cheggaaa-pb-v3
- go-github-com-davecgh-go-spew
- go-github-com-dustin-go-humanize
- go-github-com-flynn-noise
- go-github-com-francoispqt-gojay
- go-github-com-fsnotify-fsnotify
- go-github-com-gogo-protobuf
- go-github-com-google-uuid
- go-github-com-golang-groupcache-lru
- go-github-com-golang-snappy
- go-github-com-gorilla-websocket
- go-github-com-jackpal-go-nat-pmp
- go-github-com-klauspost-compress
- go-github-com-klauspost-cpuid
- go-github-com-lucas-clemente-quic-go
- go-github-com-mattn-go-colorable
- go-github-com-mattn-go-isatty
- go-github-com-mattn-go-runewidth
- go-github-com-mgutz-ansi
- go-github-com-minio-blake2b-simd
- go-github-com-minio-sha256-simd
- go-github-com-mitchellh-go-homedir
- go-github-com-mr-tron-base58
- go-github-com-opentracing-opentracing-go
- go-github-com-pkg-errors
- go-github-com-pmezard-go-difflib
- go-github-com-prometheus-client-golang
- go-github-com-prometheus-client-model
- go-github-com-prometheus-common
- go-github-com-prometheus-procfs
- go-github-com-spaolacci-murmur3
- go-github-com-stretchr-testify
- go-github-com-syndtr-goleveldb
- go-gopkg-in-yaml-v2
- go-gopkg-in-yaml-v3
- go-go-uber-org-atomic
- go-go-uber-org-multierr
- go-go-uber-org-zap
- go-golang-org-x-crypto
- go-golang-org-x-lint
- go-golang-org-x-mod
- go-golang-org-x-net
- go-golang-org-x-oauth2
- go-golang-org-x-sync
- go-golang-org-x-term
- go-golang-org-x-tools
- go-golang-org-x-xerrors
- go-golang-org-x-exp
- go-golang-org-x-text
- go-lukechampine-com-blake3)))))
- (native-inputs
- (append (if (%current-target-system)
- (list this-package)
- '())
- (list python-minimal-wrapper zsh)))
+ #:phases #~(modify-phases %standard-phases
+ ;; https://github.com/ipfs/kubo/blob/master/docs/command-completion.md
+ (add-after 'install 'install-bashcompletion
+ (lambda _
+ (let ((completiondir (string-append #$output
+ "/etc/bash_completion.d")))
+ (mkdir-p completiondir)
+ (with-output-to-file (string-append completiondir
+ "/ipfs")
+ (lambda _
+ (invoke #$(if (%current-target-system) "ipfs"
+ #~(string-append #$output
+ "/bin/ipfs"))
+ "commands" "completion" "bash")))))))))
+ (inputs (let ((p (package-input-rewriting `((,go-golang-org-x-sys unquote
+ go-golang-org-x-sys-0.8))
+ #:deep? #t)))
+ (cons go-golang-org-x-sys-0.8
+ (map p
+ (list go-github-com-alecthomas-units
+ ;; TODO: needs to be updated first
+ ;; go-github-com-blang-semver
+ go-github-com-cespare-xxhash
+ go-github-com-cheekybits-genny
+ go-github-com-cheggaaa-pb-v3
+ go-github-com-davecgh-go-spew
+ go-github-com-dustin-go-humanize
+ go-github-com-flynn-noise
+ go-github-com-francoispqt-gojay
+ go-github-com-fsnotify-fsnotify
+ go-github-com-gogo-protobuf
+ go-github-com-google-uuid
+ go-github-com-golang-groupcache-lru
+ go-github-com-golang-snappy
+ go-github-com-gorilla-websocket
+ go-github-com-jackpal-go-nat-pmp
+ go-github-com-klauspost-compress
+ go-github-com-klauspost-cpuid
+ go-github-com-lucas-clemente-quic-go
+ go-github-com-mattn-go-colorable
+ go-github-com-mattn-go-isatty
+ go-github-com-mattn-go-runewidth
+ go-github-com-mgutz-ansi
+ go-github-com-minio-blake2b-simd
+ go-github-com-minio-sha256-simd
+ go-github-com-mitchellh-go-homedir
+ go-github-com-mr-tron-base58
+ go-github-com-opentracing-opentracing-go
+ go-github-com-pkg-errors
+ go-github-com-pmezard-go-difflib
+ go-github-com-prometheus-client-golang
+ go-github-com-prometheus-client-model
+ go-github-com-prometheus-common
+ go-github-com-prometheus-procfs
+ go-github-com-spaolacci-murmur3
+ go-github-com-stretchr-testify
+ go-github-com-syndtr-goleveldb
+ go-gopkg-in-yaml-v2
+ go-gopkg-in-yaml-v3
+ go-go-uber-org-atomic
+ go-go-uber-org-multierr
+ go-go-uber-org-zap
+ go-golang-org-x-crypto
+ go-golang-org-x-lint
+ go-golang-org-x-mod
+ go-golang-org-x-net
+ go-golang-org-x-oauth2
+ go-golang-org-x-sync
+ go-golang-org-x-term
+ go-golang-org-x-tools
+ go-golang-org-x-xerrors
+ go-golang-org-x-exp
+ go-golang-org-x-text
+ go-lukechampine-com-blake3)))))
+ (native-inputs (append (if (%current-target-system)
+ (list this-package)
+ '())
+ (list python-minimal-wrapper zsh)))
(home-page "https://ipfs.io")
(synopsis "Go implementation of IPFS, a peer-to-peer hypermedia protocol")
- (description "IPFS is a global, versioned, peer-to-peer file system. It
+ (description
+ "IPFS is a global, versioned, peer-to-peer file system. It
combines good ideas from Git, BitTorrent, Kademlia, SFS, and the Web. It is
like a single bittorrent swarm, exchanging git objects. IPFS provides an
interface as simple as the HTTP web, but with permanence built in. You can
--
2.41.0