gnu: sssd: Update to 2.7.4.
[jackhill/guix/guix.git] / gnu / packages / ipfs.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
3 ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
5 ;;; Copyright © 2020, 2021, 2022 Michael Rohleder <mike@rohleder.de>
6 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages ipfs)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix gexp)
27 #:use-module (guix git-download)
28 #:use-module (guix download)
29 #:use-module (guix build-system go)
30 #:use-module (gnu packages golang)
31 #:use-module (gnu packages python)
32 #:use-module (gnu packages shells)
33 #:use-module (gnu packages syncthing))
34
35 (define-public go-github-com-ipfs-go-ipfs-cmdkit-files
36 (let ((commit
37 "386fcf8f18a185ec121676665fe2d9574496048d")
38 (revision "0"))
39 (package
40 (name "go-github-com-ipfs-go-ipfs-cmdkit-files")
41 (version (git-version "1.1.3" revision commit))
42 (source
43 (origin
44 (method git-fetch)
45 (uri (git-reference
46 (url "https://github.com/ipfs/go-ipfs-cmdkit")
47 (commit commit)))
48 (file-name (git-file-name name version))
49 (sha256
50 (base32
51 "0qk6fshgdmhp8dip2ksm13j6nywi41m9mn0czkvmw6b697z85l2r"))))
52 (build-system go-build-system)
53 (arguments
54 `(#:go ,go-1.16
55 #:unpack-path "github.com/ipfs/go-ipfs-cmdkit"
56 #:import-path "github.com/ipfs/go-ipfs-cmdkit/files"))
57 (home-page "https://github.com/ipfs/go-ipfs-cmdkit")
58 (synopsis "Shared types, functions and values for go-ipfs")
59 (description "@command{cmdkit} offers some types, functions and values
60 that are shared between @command{go-ipfs/commands} and its rewrite
61 @command{go-ipfs-cmds}.")
62 (license license:expat))))
63
64 (define-public go-github-com-ipfs-go-ipfs-api
65 (let ((commit
66 "dafc2a13a4389ac1a6c2786e34ab70a4f26d3a3f")
67 (revision "0"))
68 (package
69 (name "go-github-com-ipfs-go-ipfs-api")
70 (version (git-version "1.3.1" revision commit))
71 (source
72 (origin
73 (method git-fetch)
74 (uri (git-reference
75 (url "https://github.com/ipfs/go-ipfs-api")
76 (commit commit)))
77 (file-name (git-file-name name version))
78 (sha256
79 (base32
80 "06kibnwb037sqynk99j07wm8alvxwx3bari9gdax4jv93396kycj"))))
81 (build-system go-build-system)
82 (arguments
83 '(#:import-path "github.com/ipfs/go-ipfs-api"
84 ;; TODO: Tests fail, might need network access.
85 #:tests? #f))
86 (native-inputs
87 (list go-github-com-ipfs-go-ipfs-cmdkit-files
88 go-github-com-libp2p-go-libp2p-metrics
89 go-github-com-libp2p-go-flow-metrics
90 go-github-com-libp2p-go-libp2p-peer
91 go-github-com-libp2p-go-libp2p-protocol
92 go-github-com-libp2p-go-libp2p-crypto
93 go-github-com-mitchellh-go-homedir
94 go-github-com-multiformats-go-multiaddr
95 go-github-com-multiformats-go-multiaddr-net
96 go-github-com-btcsuite-btcd-btcec
97 go-github-com-gogo-protobuf
98 go-github-com-minio-blake2b-simd
99 go-github-com-minio-sha256-simd
100 go-github-com-mr-tron-base58
101 go-github-com-multiformats-go-multihash
102 go-golang-org-x-crypto
103 go-github-com-spaolacci-murmur3
104 go-github-com-gxed-hashland-keccakpg
105 go-github-com-whyrusleeping-tar-utils
106 go-github-com-cheekybits-is))
107 (home-page "https://github.com/ipfs/go-ipfs-api")
108 (synopsis "Unofficial Go interface to IPFS's HTTP API")
109 (description "An unofficial Go interface to IPFS's HTTP API")
110 (license license:expat))))
111
112 (define-public gx
113 (package
114 (name "gx")
115 (version "0.14.3")
116 (source
117 (origin
118 (method git-fetch)
119 (uri (git-reference
120 (url "https://github.com/whyrusleeping/gx")
121 (commit (string-append "v" version))))
122 (file-name (git-file-name name version))
123 (sha256
124 (base32 "1sk20kv3rfsnizgwmcmmr69jb1b2iwzqh9wwwd6wg6x0pnqm8swc"))))
125 (build-system go-build-system)
126 (arguments
127 '(#:import-path "github.com/whyrusleeping/gx"))
128 (native-inputs
129 (list go-github-com-blang-semver
130 go-github-com-gxed-hashland-keccakpg
131 go-github-com-ipfs-go-ipfs-api
132 go-github-com-ipfs-go-ipfs-cmdkit-files
133 go-github-com-libp2p-go-flow-metrics
134 go-github-com-libp2p-go-libp2p-crypto
135 go-github-com-libp2p-go-libp2p-metrics
136 go-github-com-libp2p-go-libp2p-peer
137 go-github-com-libp2p-go-libp2p-protocol
138 go-github-com-minio-blake2b-simd
139 go-github-com-minio-sha256-simd
140 go-github-com-mitchellh-go-homedir
141 go-github-com-mr-tron-base58
142 go-github-com-multiformats-go-multiaddr
143 go-github-com-multiformats-go-multiaddr-net
144 go-github-com-multiformats-go-multihash
145 go-github-com-spaolacci-murmur3
146 go-github-com-whyrusleeping-tar-utils
147 go-github-com-btcsuite-btcd-btcec
148 go-github-com-gogo-protobuf
149 go-github-com-sabhiram-go-gitignore
150 go-github-com-urfave-cli
151 go-github-com-whyrusleeping-json-filter
152 go-github-com-whyrusleeping-progmeter
153 go-github-com-whyrusleeping-stump
154 go-golang-org-x-crypto))
155 (home-page "https://github.com/whyrusleeping/gx")
156 (synopsis "Package management tool using IPFS")
157 (description "@command{gx} is a packaging tool built around the
158 distributed, content addressed file system IPFS. It aims to be flexible,
159 powerful and simple.")
160 (license license:expat)))
161
162 (define-public go-github-com-whyrusleeping-gx-util
163 (package
164 (inherit gx)
165 (name "go-github-com-whyrusleeping-gx-util")
166 (arguments
167 '(#:unpack-path "github.com/whyrusleeping/gx"
168 #:import-path "github.com/whyrusleeping/gx/gxutil"))))
169
170 (define-public gx-go
171 (package
172 (name "gx-go")
173 (version "1.9.0")
174 (source
175 (origin
176 (method git-fetch)
177 (uri (git-reference
178 (url "https://github.com/whyrusleeping/gx-go")
179 (commit (string-append "v" version))))
180 (file-name (git-file-name name version))
181 (sha256
182 (base32
183 "0fdy4b3ymqw6hzvvjwq37mfrdmizc8lxm53axw93n3x6118na9jc"))))
184 (build-system go-build-system)
185 (arguments
186 '(#:import-path "github.com/whyrusleeping/gx-go"))
187 (native-inputs
188 (list go-github-com-whyrusleeping-gx-util
189 go-github-com-kr-fs
190 go-github-com-gxed-hashland-keccakpg
191 go-github-com-ipfs-go-ipfs-api
192 go-github-com-ipfs-go-ipfs-cmdkit-files
193 go-github-com-libp2p-go-flow-metrics
194 go-github-com-libp2p-go-libp2p-crypto
195 go-github-com-libp2p-go-libp2p-metrics
196 go-github-com-libp2p-go-libp2p-peer
197 go-github-com-libp2p-go-libp2p-protocol
198 go-github-com-minio-blake2b-simd
199 go-github-com-minio-sha256-simd
200 go-github-com-mitchellh-go-homedir
201 go-github-com-mr-tron-base58
202 go-github-com-multiformats-go-multiaddr
203 go-github-com-multiformats-go-multiaddr-net
204 go-github-com-multiformats-go-multihash
205 go-github-com-spaolacci-murmur3
206 go-github-com-whyrusleeping-tar-utils
207 go-github-com-btcsuite-btcd-btcec
208 go-github-com-gogo-protobuf
209 go-github-com-sabhiram-go-gitignore
210 go-github-com-urfave-cli
211 go-github-com-whyrusleeping-progmeter
212 go-github-com-whyrusleeping-stump
213 go-golang-org-x-crypto))
214 (home-page "https://github.com/whyrusleeping/gx-go")
215 (synopsis "Golang subtool for the @command{gx} package manager")
216 (description "A subtool for the @command{gx} package manager for packages
217 written in Go.")
218 (license license:expat)))
219
220 (define-public go-ipfs
221 (package
222 (name "go-ipfs")
223 (version "0.11.0")
224 (source
225 (origin
226 (method url-fetch/tarbomb)
227 (uri (string-append
228 "https://dist.ipfs.io/go-ipfs/v" version
229 "/go-ipfs-source.tar.gz"))
230 (sha256
231 (base32 "13pmj83hwpz6mk7x52qn0cjnfqxqw2qri3r0k4b270w3bafcccwm"))
232 (file-name (string-append name "-" version "-source"))
233 (modules '((guix build utils)))
234 (snippet '(for-each delete-file-recursively
235 ;; TODO: unbundle the rest as well
236 '("vendor/github.com/alecthomas"
237 ;; "vendor/github.com/blang"
238 "vendor/github.com/cespare"
239 ;; TODO: Go files not found
240 ;; "vendor/github.com/cheggaaa"
241 "vendor/github.com/davecgh"
242 "vendor/github.com/dustin"
243 "vendor/github.com/flynn"
244 "vendor/github.com/francoispqt"
245 "vendor/github.com/fsnotify"
246 "vendor/github.com/gogo"
247 "vendor/github.com/golang/groupcache"
248 "vendor/github.com/golang/snappy"
249 "vendor/github.com/google/uuid"
250 "vendor/github.com/gorilla"
251 ;; These should be fine, they are part of
252 ;; the IPFS project
253 ;; "vendor/github.com/ipfs"
254 ;; "vendor/github.com/ipld"
255 "vendor/github.com/jackpal"
256 "vendor/github.com/klauspost"
257 ;; TODO: Go files not found
258 ;; "vendor/github.com/lucas-clemente"
259 "vendor/github.com/mattn"
260 "vendor/github.com/mgutz"
261 "vendor/github.com/minio"
262 "vendor/github.com/mitchellh"
263 "vendor/github.com/mr-tron"
264 "vendor/github.com/opentracing"
265 "vendor/github.com/pkg"
266 "vendor/github.com/pmezard"
267 "vendor/github.com/prometheus/client_golang"
268 "vendor/github.com/prometheus/client_model"
269 "vendor/github.com/prometheus/common"
270 "vendor/github.com/prometheus/procfs"
271 "vendor/github.com/spaolacci"
272 "vendor/github.com/stretchr"
273 "vendor/github.com/syndtr"
274 "vendor/golang.org/x"
275 "vendor/gopkg.in/yaml.v2"
276 "vendor/gopkg.in/yaml.v3"
277 "vendor/go.uber.org/atomic"
278 "vendor/go.uber.org/multierr"
279 "vendor/go.uber.org/zap"
280 "vendor/lukechampine.com")))))
281 (build-system go-build-system)
282 (arguments
283 (list
284 #:unpack-path "github.com/ipfs/go-ipfs"
285 #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs"
286 #:phases
287 #~(modify-phases %standard-phases
288 ;; https://github.com/ipfs/kubo/blob/master/docs/command-completion.md
289 (add-after 'install 'install-bashcompletion
290 (lambda _
291 (let ((completiondir (string-append #$output
292 "/etc/bash_completion.d")))
293 (mkdir-p completiondir)
294 (with-output-to-file (string-append completiondir "/ipfs")
295 (lambda _
296 (invoke #$(if (%current-target-system)
297 "ipfs"
298 #~(string-append #$output "/bin/ipfs"))
299 "commands" "completion" "bash")))))))))
300 (inputs (list go-github-com-alecthomas-units
301 ;; TODO: needs to be updated first
302 ;; go-github-com-blang-semver
303 go-github-com-cespare-xxhash
304 go-github-com-cheekybits-genny
305 go-github-com-cheggaaa-pb-v3
306 go-github-com-davecgh-go-spew
307 go-github-com-dustin-go-humanize
308 go-github-com-flynn-noise
309 go-github-com-francoispqt-gojay
310 go-github-com-fsnotify-fsnotify
311 go-github-com-gogo-protobuf
312 go-github-com-google-uuid
313 go-github-com-golang-groupcache-lru
314 go-github-com-golang-snappy
315 go-github-com-gorilla-websocket
316 go-github-com-jackpal-go-nat-pmp
317 go-github-com-klauspost-compress
318 go-github-com-klauspost-cpuid
319 go-github-com-lucas-clemente-quic-go
320 go-github-com-mattn-go-colorable
321 go-github-com-mattn-go-isatty
322 go-github-com-mattn-go-runewidth
323 go-github-com-mgutz-ansi
324 go-github-com-minio-blake2b-simd
325 go-github-com-minio-sha256-simd
326 go-github-com-mitchellh-go-homedir
327 go-github-com-mr-tron-base58
328 go-github-com-opentracing-opentracing-go
329 go-github-com-pkg-errors
330 go-github-com-pmezard-go-difflib
331 go-github-com-prometheus-client-golang
332 go-github-com-prometheus-client-model
333 go-github-com-prometheus-common
334 go-github-com-prometheus-procfs
335 go-github-com-spaolacci-murmur3
336 go-github-com-stretchr-testify
337 go-github-com-syndtr-goleveldb
338 go-gopkg-in-yaml-v2
339 go-gopkg-in-yaml-v3
340 go-go-uber-org-atomic
341 go-go-uber-org-multierr
342 go-go-uber-org-zap
343 go-golang-org-x-crypto
344 go-golang-org-x-lint
345 go-golang-org-x-mod
346 go-golang-org-x-net
347 go-golang-org-x-oauth2
348 go-golang-org-x-sync
349 go-golang-org-x-sys
350 go-golang-org-x-term
351 go-golang-org-x-tools
352 go-golang-org-x-xerrors
353 go-lukechampine-com-blake3))
354 (native-inputs
355 (append (if (%current-target-system)
356 (list this-package)
357 '())
358 (list python-minimal-wrapper zsh)))
359 (home-page "https://ipfs.io")
360 (synopsis "Go implementation of IPFS, a peer-to-peer hypermedia protocol")
361 (description "IPFS is a global, versioned, peer-to-peer file system. It
362 combines good ideas from Git, BitTorrent, Kademlia, SFS, and the Web. It is
363 like a single bittorrent swarm, exchanging git objects. IPFS provides an
364 interface as simple as the HTTP web, but with permanence built in. You can
365 also mount the world at @code{/ipfs}.")
366 (license license:expat)))