Merge branch 'master' into core-updates
[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 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages ipfs)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix packages)
23 #:use-module (guix git-download)
24 #:use-module (guix download)
25 #:use-module (guix build-system go)
26 #:use-module (gnu packages golang))
27
28 (define-public go-github-com-ipfs-go-ipfs-cmdkit-files
29 (let ((commit
30 "386fcf8f18a185ec121676665fe2d9574496048d")
31 (revision "0"))
32 (package
33 (name "go-github-com-ipfs-go-ipfs-cmdkit-files")
34 (version (git-version "1.1.3" revision commit))
35 (source
36 (origin
37 (method git-fetch)
38 (uri (git-reference
39 (url "https://github.com/ipfs/go-ipfs-cmdkit.git")
40 (commit commit)))
41 (file-name (git-file-name name version))
42 (sha256
43 (base32
44 "0qk6fshgdmhp8dip2ksm13j6nywi41m9mn0czkvmw6b697z85l2r"))))
45 (build-system go-build-system)
46 (arguments
47 '(#:unpack-path "github.com/ipfs/go-ipfs-cmdkit"
48 #:import-path "github.com/ipfs/go-ipfs-cmdkit/files"))
49 (home-page "https://github.com/ipfs/go-ipfs-cmdkit")
50 (synopsis "Shared types, functions and values for go-ipfs")
51 (description "@command{cmdkit} offers some types, functions and values
52 that are shared between @command{go-ipfs/commands} and its rewrite
53 @command{go-ipfs-cmds}.")
54 (license license:expat))))
55
56 (define-public go-github-com-ipfs-go-ipfs-api
57 (let ((commit
58 "dafc2a13a4389ac1a6c2786e34ab70a4f26d3a3f")
59 (revision "0"))
60 (package
61 (name "go-github-com-ipfs-go-ipfs-api")
62 (version (git-version "1.3.1" revision commit))
63 (source
64 (origin
65 (method git-fetch)
66 (uri (git-reference
67 (url "https://github.com/ipfs/go-ipfs-api.git")
68 (commit commit)))
69 (file-name (git-file-name name version))
70 (sha256
71 (base32
72 "06kibnwb037sqynk99j07wm8alvxwx3bari9gdax4jv93396kycj"))))
73 (build-system go-build-system)
74 (arguments
75 '(#:import-path "github.com/ipfs/go-ipfs-api"
76 ;; TODO: Tests fail, might need network access.
77 #:tests? #f))
78 (native-inputs
79 `(("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
80 ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
81 ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
82 ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
83 ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
84 ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
85 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
86 ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
87 ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
88 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
89 ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
90 ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
91 ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
92 ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
93 ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
94 ("go-golang-org-x-crypto-blake2s" ,go-golang-org-x-crypto-blake2s)
95 ("go-golang-org-x-crypto-ed25519" ,go-golang-org-x-crypto-ed25519)
96 ("go-golang-org-x-crypto-sha3" ,go-golang-org-x-crypto-sha3)
97 ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
98 ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
99 ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
100 ("go-github-com-cheekybits-is" ,go-github-com-cheekybits-is)))
101 (home-page "https://github.com/ipfs/go-ipfs-api")
102 (synopsis "Unofficial Go interface to IPFS's HTTP API")
103 (description "An unofficial Go interface to IPFS's HTTP API")
104 (license license:expat))))
105
106 (define-public gx
107 (package
108 (name "gx")
109 (version "0.14.1")
110 (source
111 (origin
112 (method git-fetch)
113 (uri (git-reference
114 (url "https://github.com/whyrusleeping/gx.git")
115 (commit (string-append "v" version))))
116 (file-name (git-file-name name version))
117 (sha256
118 (base32
119 "0pfx2p59xdbmqzfbgaf8xvlnzh8m05hkg596glq5kvl8ib65i4ha"))))
120 (build-system go-build-system)
121 (arguments
122 '(#:import-path "github.com/whyrusleeping/gx"))
123 (native-inputs
124 `(("go-github-com-blang-semver" ,go-github-com-blang-semver)
125 ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
126 ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api)
127 ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
128 ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
129 ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
130 ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
131 ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
132 ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
133 ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
134 ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
135 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
136 ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
137 ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
138 ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
139 ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
140 ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
141 ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
142 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
143 ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
144 ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
145 ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
146 ("go-github-com-whyrusleeping-json-filter" ,go-github-com-whyrusleeping-json-filter)
147 ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
148 ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)
149 ("go-golang-org-x-crypto-blake2s" ,go-golang-org-x-crypto-blake2s)
150 ("go-golang-org-x-crypto-ed25519" ,go-golang-org-x-crypto-ed25519)
151 ("go-golang-org-x-crypto-sha3" ,go-golang-org-x-crypto-sha3)))
152 (home-page "https://github.com/whyrusleeping/gx")
153 (synopsis "Package management tool using IPFS")
154 (description "@command{gx} is a packaging tool built around the
155 distributed, content addressed file system IPFS. It aims to be flexible,
156 powerful and simple.")
157 (license license:expat)))
158
159 (define-public go-github-com-whyrusleeping-gx-util
160 (package
161 (inherit gx)
162 (name "go-github-com-whyrusleeping-gx-util")
163 (arguments
164 '(#:unpack-path "github.com/whyrusleeping/gx"
165 #:import-path "github.com/whyrusleeping/gx/gxutil"))))
166
167 (define-public gx-go
168 (package
169 (name "gx-go")
170 (version "1.9.0")
171 (source
172 (origin
173 (method git-fetch)
174 (uri (git-reference
175 (url "https://github.com/whyrusleeping/gx-go")
176 (commit (string-append "v" version))))
177 (file-name (git-file-name name version))
178 (sha256
179 (base32
180 "0fdy4b3ymqw6hzvvjwq37mfrdmizc8lxm53axw93n3x6118na9jc"))))
181 (build-system go-build-system)
182 (arguments
183 '(#:import-path "github.com/whyrusleeping/gx-go"))
184 (native-inputs
185 `(("go-github-com-whyrusleeping-gx-util" ,go-github-com-whyrusleeping-gx-util)
186 ("go-github-com-kr-fs" ,go-github-com-kr-fs)
187 ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
188 ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api)
189 ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
190 ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
191 ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
192 ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
193 ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
194 ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
195 ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
196 ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
197 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
198 ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
199 ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
200 ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
201 ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
202 ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
203 ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
204 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
205 ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
206 ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
207 ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
208 ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
209 ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)
210 ("go-golang-org-x-crypto-blake2s" ,go-golang-org-x-crypto-blake2s)
211 ("go-golang-org-x-crypto-ed25519" ,go-golang-org-x-crypto-ed25519)
212 ("go-golang-org-x-crypto-sha3" ,go-golang-org-x-crypto-sha3)))
213 (home-page "https://github.com/whyrusleeping/gx-go")
214 (synopsis "Golang subtool for the @command{gx} package manager")
215 (description "A subtool for the @command{gx} package manager for packages
216 written in Go.")
217 (license license:expat)))
218
219 (define-public go-ipfs
220 (package
221 (name "go-ipfs")
222 (version "0.4.19")
223 (source
224 (origin
225 (method url-fetch/tarbomb)
226 (uri (string-append
227 "https://dist.ipfs.io/go-ipfs/v" version
228 "/go-ipfs-source.tar.gz"))
229 (sha256
230 (base32 "0s04ap14p6hnipjm27nm5k8s28zv9k5g9mziyh3ibgwn7dzb1kpx"))
231 (file-name (string-append name "-" version "-source"))))
232 (build-system go-build-system)
233 (arguments
234 '(#:unpack-path "github.com/ipfs/go-ipfs"
235 #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs"
236 #:phases (modify-phases %standard-phases
237 (add-before 'reset-gzip-timestamps 'make-files-writable
238 (lambda* (#:key outputs #:allow-other-keys)
239 ;; Make sure .gz files are writable so that the
240 ;; 'reset-gzip-timestamps' phase can do its work.
241 (let ((out (assoc-ref outputs "out")))
242 (for-each make-file-writable
243 (find-files out "\\.gz$"))
244 #t))))))
245 (home-page "https://ipfs.io")
246 (synopsis "Go implementation of IPFS, a peer-to-peer hypermedia protocol")
247 (description "IPFS is a global, versioned, peer-to-peer file system. It
248 combines good ideas from Git, BitTorrent, Kademlia, SFS, and the Web. It is
249 like a single bittorrent swarm, exchanging git objects. IPFS provides an
250 interface as simple as the HTTP web, but with permanence built in. You can
251 also mount the world at @code{/ipfs}.")
252 (license license:expat)))