From 85a603f58b9b6fef86984a3b2cfc27bd13314ba1 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Mon, 9 Sep 2024 20:59:21 +0100 Subject: [PATCH] gnu: kubo: Unbundle more inputs. * gnu/packages/ipfs.scm (kubo): Unbundle more inputs. [source]: Delete "vendor/github.com/AndreasBriese", "vendor/github.com/containerd", "vendor/github.com/davidlazar", "vendor/github.com/decred", "vendor/github.com/dgraph-io", "vendor/github.com/elastic", "vendor/github.com/ipfs/go-ds-badger", "vendor/github.com/ipfs/go-ds-leveldb", "vendor/github.com/libp2p/go-libp2p", "vendor/github.com/marten-seemann", "vendor/github.com/mikioh", "vendor/github.com/opencontainers", and "vendor/github.com/raulk". [arguments] <#:phases>: Simplify 'copy-input-to-vendor-directory by replacing it with 'fix-embed-go-libp2p-asn-util. [inputs]: Remove go-github-com-docker-go-units, go-github-com-flynn-noise, go-github-com-gorilla-websocket, go-github-com-klauspost-compress, go-github-com-libp2p-go-buffer-pool, go-github-com-libp2p-go-flow-metrics, go-github-com-libp2p-go-nat, go-github-com-libp2p-go-reuseport, go-github-com-libp2p-go-yamux-v4, go-github-com-libp2p-zeroconf-v2, go-github-com-multiformats-go-multiaddr-fmt, go-github-com-multiformats-go-multistream, go-github-com-pion-webrtc-v3, go-github-com-quic-go-quic-go, and go-github-com-quic-go-webtransport-go; add go-github-com-ipfs-go-ds-badger, go-github-com-ipfs-go-ds-leveldb, and go-github-com-libp2p-go-libp2p. Change-Id: Ied37be0a18e98bd5fe6d1c6d721d0c5733460721 --- gnu/packages/ipfs.scm | 63 +++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 38 deletions(-) diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm index f5b978cc65..e03203e70e 100644 --- a/gnu/packages/ipfs.scm +++ b/gnu/packages/ipfs.scm @@ -989,6 +989,7 @@ (define-public kubo (snippet '(for-each delete-file-recursively ;; TODO: unbundle the rest as well '("vendor/bazil.org" + "vendor/github.com/AndreasBriese" "vendor/github.com/alecthomas" "vendor/github.com/benbjohnson" "vendor/github.com/beorn7" @@ -996,10 +997,15 @@ (define-public kubo "vendor/github.com/cenkalti" "vendor/github.com/cespare" "vendor/github.com/cheggaaa" + "vendor/github.com/containerd" "vendor/github.com/coreos" "vendor/github.com/davecgh" + "vendor/github.com/davidlazar" + "vendor/github.com/decred" + "vendor/github.com/dgraph-io" "vendor/github.com/docker" "vendor/github.com/dustin" + "vendor/github.com/elastic" "vendor/github.com/elgris" "vendor/github.com/facebookgo" "vendor/github.com/felixge" @@ -1024,6 +1030,8 @@ (define-public kubo "vendor/github.com/ipfs/go-cidutil" "vendor/github.com/ipfs/go-datastore" "vendor/github.com/ipfs/go-detect-race" + "vendor/github.com/ipfs/go-ds-badger" + "vendor/github.com/ipfs/go-ds-leveldb" "vendor/github.com/ipfs/go-ipfs-delay" "vendor/github.com/ipfs/go-ipfs-redirects-file" "vendor/github.com/ipfs/go-ipfs-util" @@ -1045,6 +1053,7 @@ (define-public kubo "vendor/github.com/libp2p/go-cidranger" "vendor/github.com/libp2p/go-doh-resolver" "vendor/github.com/libp2p/go-flow-metrics" + "vendor/github.com/libp2p/go-libp2p" "vendor/github.com/libp2p/go-libp2p-asn-util" "vendor/github.com/libp2p/go-msgio" "vendor/github.com/libp2p/go-nat" @@ -1053,14 +1062,17 @@ (define-public kubo "vendor/github.com/libp2p/go-socket-activation" "vendor/github.com/libp2p/go-yamux" "vendor/github.com/libp2p/zeroconf" + "vendor/github.com/marten-seemann" "vendor/github.com/mattn" "vendor/github.com/mgutz" "vendor/github.com/miekg" + "vendor/github.com/mikioh" "vendor/github.com/minio" "vendor/github.com/mitchellh" "vendor/github.com/mr-tron" "vendor/github.com/multiformats" "vendor/github.com/onsi" + "vendor/github.com/opencontainers" "vendor/github.com/opentracing" "vendor/github.com/pbnjay" "vendor/github.com/pion" @@ -1069,6 +1081,7 @@ (define-public kubo "vendor/github.com/polydawn" "vendor/github.com/prometheus" "vendor/github.com/quic-go" + "vendor/github.com/raulk" "vendor/github.com/rs" "vendor/github.com/spaolacci" "vendor/github.com/stretchr" @@ -1088,26 +1101,15 @@ (define-public kubo #:import-path "github.com/ipfs/kubo/cmd/ipfs" #:phases #~(modify-phases %standard-phases - ;; FIXME: src/github.com/libp2p/go-libp2p-asn-util/asn.go:12:12: - ;; pattern sorted-network-list.bin: cannot embed irregular file - ;; sorted-network-list.bin - ;; - ;; 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: - ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454 - ;; - file: src/cmd/go/internal/load/pkg.go#L2059 - (add-before 'build 'copy-input-to-vendor-directory - (lambda* (#:key unpack-path #:allow-other-keys) - (with-directory-excursion (string-append "src/" unpack-path) - (copy-recursively - (string-append - #$(this-package-input "go-github-com-libp2p-go-libp2p-asn-util") - "/src/github.com") - "vendor/github.com")))) + (add-after 'unpack 'fix-embed-go-libp2p-asn-util + (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"))) ;; https://github.com/ipfs/kubo/blob/master/docs/command-completion.md (add-after 'install 'install-bashcompletion (lambda _ @@ -1146,9 +1148,9 @@ (define-public kubo go-github-com-ipfs-go-cidutil go-github-com-ipfs-go-datastore go-github-com-ipfs-go-detect-race - ;;go-github-com-ipfs-go-ds-badger + go-github-com-ipfs-go-ds-badger ;;go-github-com-ipfs-go-ds-flatfs - ;;go-github-com-ipfs-go-ds-leveldb + go-github-com-ipfs-go-ds-leveldb ;;go-github-com-ipfs-go-ds-measure ;;go-github-com-ipfs-go-fs-lock ;;go-github-com-ipfs-go-ipfs-cmds @@ -1172,7 +1174,7 @@ (define-public kubo go-github-com-jbenet-goprocess go-github-com-julienschmidt-httprouter go-github-com-libp2p-go-doh-resolver - ;;go-github-com-libp2p-go-libp2p + go-github-com-libp2p-go-libp2p ;;go-github-com-libp2p-go-libp2p-http ;;go-github-com-libp2p-go-libp2p-kad-dht ;;go-github-com-libp2p-go-libp2p-kbucket @@ -1222,36 +1224,21 @@ (define-public kubo ;; go-github-com-alecthomas-units ; github.com/ipfs/boxo go-github-com-cespare-xxhash - go-github-com-docker-go-units ; github.com/containerd/cgroups go-github-com-felixge-httpsnoop ; go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp - go-github-com-flynn-noise ; github.com/libp2p/go-libp2p go-github-com-gabriel-vasile-mimetype ; github.com/ipfs/boxo go-github-com-go-logr-stdr ; go.opentelemetry.io/otel go-github-com-golang-groupcache ; go.opencensus.io/trace go-github-com-google-gopacket ; github.com/libp2p/go-libp2p-kad-dht go-github-com-gorilla-mux ; github.com/ipfs/boxo - go-github-com-gorilla-websocket ; github.com/libp2p/go-libp2p go-github-com-hashicorp-golang-lru ; github.com/libp2p/go-libp2p-kad-dht go-github-com-hashicorp-golang-lru-v2 ; github.com/ipfs/boxo go-github-com-ipfs-go-bitfield ; github.com/ipfs/boxo go-github-com-ipfs-go-ipfs-redirects-file ; github.com/ipfs/boxo go-github-com-ipfs-go-verifcid ; github.com/ipfs/go-blockservice - go-github-com-klauspost-compress ; github.com/libp2p/go-libp2p - go-github-com-libp2p-go-buffer-pool ; github.com/libp2p/go-libp2p go-github-com-libp2p-go-cidranger ; github.com/libp2p/go-libp2p-kbucket - go-github-com-libp2p-go-flow-metrics ; github.com/libp2p/go-libp2p go-github-com-libp2p-go-libp2p-asn-util ; github.com/libp2p/go-libp2p-kbucket go-github-com-libp2p-go-msgio ; github.com/libp2p/go-libp2p-kad-dht - go-github-com-libp2p-go-nat ; github.com/libp2p/go-libp2p - go-github-com-libp2p-go-reuseport ; github.com/libp2p/go-libp2p - go-github-com-libp2p-go-yamux-v4 ; github.com/libp2p/go-libp2p - go-github-com-libp2p-zeroconf-v2 ; github.com/libp2p/go-libp2p - go-github-com-multiformats-go-multiaddr-fmt ; github.com/libp2p/go-libp2p - go-github-com-multiformats-go-multistream ; github.com/libp2p/go-libp2p - go-github-com-pion-webrtc-v3 ; github.com/libp2p/go-libp2p go-github-com-prometheus-statsd-exporter ; contrib.go.opencensus.io/exporter/prometheus - go-github-com-quic-go-quic-go ; github.com/libp2p/go-libp2p - go-github-com-quic-go-webtransport-go ; github.com/libp2p/go-libp2p go-github-com-rs-cors ; github.com/ipfs/go-ipfs-cmds go-github-com-whyrusleeping-base32 ; github.com/ipfs/boxo go-github-com-whyrusleeping-cbor ; github.com/ipld/go-car