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