gnu: igt-gpu-tools: Don't use NAME in source URI.
[jackhill/guix/guix.git] / gnu / packages / ipfs.scm
CommitLineData
247b1bd2
PN
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
8c35a6dd 3;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
247b1bd2
PN
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)
505a3854 24 #:use-module (guix download)
247b1bd2
PN
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
52that are shared between @command{go-ipfs/commands} and its rewrite
53@command{go-ipfs-cmds}.")
54 (license license:expat))))
566f13f8
PN
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-union" ,(go-golang-org-x-crypto-union))
95 ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
96 ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
97 ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
98 ("go-github-com-cheekybits-is" ,go-github-com-cheekybits-is)))
99 (home-page "https://github.com/ipfs/go-ipfs-api")
100 (synopsis "Unofficial Go interface to IPFS's HTTP API")
101 (description "An unofficial Go interface to IPFS's HTTP API")
102 (license license:expat))))
202c1b97
PN
103
104(define-public gx
8c35a6dd
TGR
105 (package
106 (name "gx")
107 (version "0.14.1")
108 (source
109 (origin
110 (method git-fetch)
111 (uri (git-reference
112 (url "https://github.com/whyrusleeping/gx.git")
113 (commit (string-append "v" version))))
114 (file-name (git-file-name name version))
115 (sha256
116 (base32
117 "0pfx2p59xdbmqzfbgaf8xvlnzh8m05hkg596glq5kvl8ib65i4ha"))))
118 (build-system go-build-system)
119 (arguments
120 '(#:import-path "github.com/whyrusleeping/gx"))
121 (native-inputs
122 `(("go-github-com-blang-semver" ,go-github-com-blang-semver)
123 ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
124 ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api)
125 ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
126 ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
127 ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
128 ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
129 ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
130 ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
131 ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
132 ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
133 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
134 ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
135 ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
136 ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
137 ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
138 ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
139 ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
140 ("go-golang-org-x-crypto-union" ,(go-golang-org-x-crypto-union))
141 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
142 ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
143 ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
144 ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
145 ("go-github-com-whyrusleeping-json-filter" ,go-github-com-whyrusleeping-json-filter)
146 ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
147 ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)))
148 (home-page "https://github.com/whyrusleeping/gx")
149 (synopsis "Package management tool using IPFS")
150 (description "@command{gx} is a packaging tool built around the
202c1b97
PN
151distributed, content addressed filesystem IPFS. It aims to be flexible,
152powerful and simple.")
8c35a6dd 153 (license license:expat)))
e82ae673
PN
154
155(define-public go-github-com-whyrusleeping-gx-util
156 (package
157 (inherit gx)
158 (name "go-github-com-whyrusleeping-gx-util")
159 (arguments
160 '(#:unpack-path "github.com/whyrusleeping/gx"
161 #:import-path "github.com/whyrusleeping/gx/gxutil"))))
96b4977a
PN
162
163(define-public gx-go
164 (package
165 (name "gx-go")
166 (version "1.9.0")
167 (source
168 (origin
169 (method git-fetch)
170 (uri (git-reference
171 (url "https://github.com/whyrusleeping/gx-go")
172 (commit (string-append "v" version))))
173 (file-name (git-file-name name version))
174 (sha256
175 (base32
176 "0fdy4b3ymqw6hzvvjwq37mfrdmizc8lxm53axw93n3x6118na9jc"))))
177 (build-system go-build-system)
178 (arguments
179 '(#:import-path "github.com/whyrusleeping/gx-go"))
180 (native-inputs
181 `(("go-github-com-whyrusleeping-gx-util" ,go-github-com-whyrusleeping-gx-util)
182 ("go-github-com-kr-fs" ,go-github-com-kr-fs)
183 ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
184 ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api)
185 ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
186 ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
187 ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
188 ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
189 ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
190 ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
191 ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
192 ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
193 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
194 ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
195 ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
196 ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
197 ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
198 ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
199 ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
200 ("go-golang-org-x-crypto-union" ,(go-golang-org-x-crypto-union))
201 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
202 ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
203 ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
204 ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
205 ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
206 ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)))
207 (home-page "https://github.com/whyrusleeping/gx-go")
208 (synopsis "Golang subtool for the @command{gx} package manager")
209 (description "A subtool for the @command{gx} package manager for packages
210written in Go.")
211 (license license:expat)))
505a3854
PN
212
213(define-public go-ipfs
214 (package
215 (name "go-ipfs")
216 (version "0.4.18")
217 (source
218 (origin
5e741ff0 219 (method url-fetch/tarbomb)
505a3854
PN
220 (uri (string-append
221 "https://dist.ipfs.io/go-ipfs/v" version
222 "/go-ipfs-source.tar.gz"))
223 (sha256
224 (base32
5e741ff0
LC
225 "19hfgbyn5sr1bw0cwm3gsjz0w3b3vh3mmkax1906raah30lavj1x"))
226 (file-name (string-append name "-" version "-source"))))
505a3854
PN
227 (build-system go-build-system)
228 (arguments
229 '(#:unpack-path "github.com/ipfs/go-ipfs"
5e741ff0
LC
230 #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs"
231 #:phases (modify-phases %standard-phases
232 (add-before 'reset-gzip-timestamps 'make-files-writable
233 (lambda* (#:key outputs #:allow-other-keys)
234 ;; Make sure .gz files are writable so that the
235 ;; 'reset-gzip-timestamps' phase can do its work.
236 (let ((out (assoc-ref outputs "out")))
237 (for-each make-file-writable
238 (find-files out "\\.gz$"))
239 #t))))))
505a3854
PN
240 (home-page "https://ipfs.io")
241 (synopsis "Go implementation of IPFS, a peer-to-peer hypermedia protocol")
242 (description "IPFS is a global, versioned, peer-to-peer filesystem. It
243combines good ideas from Git, BitTorrent, Kademlia, SFS, and the Web. It is
244like a single bittorrent swarm, exchanging git objects. IPFS provides an
245interface as simple as the HTTP web, but with permanence built in. You can
246also mount the world at @code{/ipfs}.")
247 (license license:expat)))