gnu: Remove ".git" from "https://github/…/….git".
[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>
d64d8abb 3;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
69288a84 4;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
247b1bd2
PN
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages ipfs)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix git-download)
505a3854 25 #:use-module (guix download)
247b1bd2
PN
26 #:use-module (guix build-system go)
27 #:use-module (gnu packages golang))
28
29(define-public go-github-com-ipfs-go-ipfs-cmdkit-files
30 (let ((commit
31 "386fcf8f18a185ec121676665fe2d9574496048d")
32 (revision "0"))
33 (package
34 (name "go-github-com-ipfs-go-ipfs-cmdkit-files")
35 (version (git-version "1.1.3" revision commit))
36 (source
37 (origin
38 (method git-fetch)
39 (uri (git-reference
b0e7b699 40 (url "https://github.com/ipfs/go-ipfs-cmdkit")
247b1bd2
PN
41 (commit commit)))
42 (file-name (git-file-name name version))
43 (sha256
44 (base32
45 "0qk6fshgdmhp8dip2ksm13j6nywi41m9mn0czkvmw6b697z85l2r"))))
46 (build-system go-build-system)
47 (arguments
48 '(#:unpack-path "github.com/ipfs/go-ipfs-cmdkit"
49 #:import-path "github.com/ipfs/go-ipfs-cmdkit/files"))
50 (home-page "https://github.com/ipfs/go-ipfs-cmdkit")
51 (synopsis "Shared types, functions and values for go-ipfs")
52 (description "@command{cmdkit} offers some types, functions and values
53that are shared between @command{go-ipfs/commands} and its rewrite
54@command{go-ipfs-cmds}.")
55 (license license:expat))))
566f13f8
PN
56
57(define-public go-github-com-ipfs-go-ipfs-api
58 (let ((commit
59 "dafc2a13a4389ac1a6c2786e34ab70a4f26d3a3f")
60 (revision "0"))
61 (package
62 (name "go-github-com-ipfs-go-ipfs-api")
63 (version (git-version "1.3.1" revision commit))
64 (source
65 (origin
66 (method git-fetch)
67 (uri (git-reference
b0e7b699 68 (url "https://github.com/ipfs/go-ipfs-api")
566f13f8
PN
69 (commit commit)))
70 (file-name (git-file-name name version))
71 (sha256
72 (base32
73 "06kibnwb037sqynk99j07wm8alvxwx3bari9gdax4jv93396kycj"))))
74 (build-system go-build-system)
75 (arguments
76 '(#:import-path "github.com/ipfs/go-ipfs-api"
77 ;; TODO: Tests fail, might need network access.
78 #:tests? #f))
79 (native-inputs
80 `(("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
81 ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
82 ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
83 ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
84 ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
85 ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
86 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
87 ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
88 ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
89 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
35defe61 90 ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
566f13f8
PN
91 ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
92 ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
93 ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
94 ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
561d391b 95 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
566f13f8
PN
96 ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
97 ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
98 ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
99 ("go-github-com-cheekybits-is" ,go-github-com-cheekybits-is)))
100 (home-page "https://github.com/ipfs/go-ipfs-api")
101 (synopsis "Unofficial Go interface to IPFS's HTTP API")
102 (description "An unofficial Go interface to IPFS's HTTP API")
103 (license license:expat))))
202c1b97
PN
104
105(define-public gx
8c35a6dd
TGR
106 (package
107 (name "gx")
d64d8abb 108 (version "0.14.3")
8c35a6dd
TGR
109 (source
110 (origin
111 (method git-fetch)
112 (uri (git-reference
b0e7b699 113 (url "https://github.com/whyrusleeping/gx")
8c35a6dd
TGR
114 (commit (string-append "v" version))))
115 (file-name (git-file-name name version))
116 (sha256
d64d8abb 117 (base32 "1sk20kv3rfsnizgwmcmmr69jb1b2iwzqh9wwwd6wg6x0pnqm8swc"))))
8c35a6dd
TGR
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)
8c35a6dd 140 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
35defe61 141 ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
8c35a6dd
TGR
142 ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
143 ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
144 ("go-github-com-whyrusleeping-json-filter" ,go-github-com-whyrusleeping-json-filter)
145 ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
9c359ff4 146 ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)
561d391b 147 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
8c35a6dd
TGR
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
52beae7b 151distributed, content addressed file system IPFS. It aims to be flexible,
202c1b97 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)
96b4977a 200 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
35defe61 201 ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
96b4977a
PN
202 ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
203 ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
204 ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
9c359ff4 205 ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)
561d391b 206 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
96b4977a
PN
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")
69288a84 216 (version "0.5.1")
505a3854
PN
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
69288a84 224 (base32 "0lpilycjbc1g9adp4d5kryfprixj18hg3235fnivakmv7fy2akkm"))
5e741ff0 225 (file-name (string-append name "-" version "-source"))))
505a3854
PN
226 (build-system go-build-system)
227 (arguments
228 '(#:unpack-path "github.com/ipfs/go-ipfs"
5e741ff0
LC
229 #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs"
230 #:phases (modify-phases %standard-phases
231 (add-before 'reset-gzip-timestamps 'make-files-writable
232 (lambda* (#:key outputs #:allow-other-keys)
233 ;; Make sure .gz files are writable so that the
234 ;; 'reset-gzip-timestamps' phase can do its work.
235 (let ((out (assoc-ref outputs "out")))
236 (for-each make-file-writable
237 (find-files out "\\.gz$"))
238 #t))))))
505a3854
PN
239 (home-page "https://ipfs.io")
240 (synopsis "Go implementation of IPFS, a peer-to-peer hypermedia protocol")
52beae7b 241 (description "IPFS is a global, versioned, peer-to-peer file system. It
505a3854
PN
242combines good ideas from Git, BitTorrent, Kademlia, SFS, and the Web. It is
243like a single bittorrent swarm, exchanging git objects. IPFS provides an
244interface as simple as the HTTP web, but with permanence built in. You can
245also mount the world at @code{/ipfs}.")
246 (license license:expat)))