Commit | Line | Data |
---|---|---|
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 | |
52 | that 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) | |
35defe61 | 89 | ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf) |
566f13f8 PN |
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) | |
561d391b | 94 | ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) |
566f13f8 PN |
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") | |
3190e967 | 107 | (version "0.14.2") |
8c35a6dd TGR |
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 | |
3190e967 | 116 | (base32 "048bx6khzcwxnvz3lf7kgp6fkg8mxqcqchxh0jxm9fg2iwizsi0k")))) |
8c35a6dd TGR |
117 | (build-system go-build-system) |
118 | (arguments | |
119 | '(#:import-path "github.com/whyrusleeping/gx")) | |
120 | (native-inputs | |
121 | `(("go-github-com-blang-semver" ,go-github-com-blang-semver) | |
122 | ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg) | |
123 | ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api) | |
124 | ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files) | |
125 | ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics) | |
126 | ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto) | |
127 | ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics) | |
128 | ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer) | |
129 | ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol) | |
130 | ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd) | |
131 | ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd) | |
132 | ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir) | |
133 | ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58) | |
134 | ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr) | |
135 | ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net) | |
136 | ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash) | |
137 | ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3) | |
138 | ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils) | |
8c35a6dd | 139 | ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec) |
35defe61 | 140 | ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf) |
8c35a6dd TGR |
141 | ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore) |
142 | ("go-github-com-urfave-cli" ,go-github-com-urfave-cli) | |
143 | ("go-github-com-whyrusleeping-json-filter" ,go-github-com-whyrusleeping-json-filter) | |
144 | ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter) | |
9c359ff4 | 145 | ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump) |
561d391b | 146 | ("go-golang-org-x-crypto" ,go-golang-org-x-crypto))) |
8c35a6dd TGR |
147 | (home-page "https://github.com/whyrusleeping/gx") |
148 | (synopsis "Package management tool using IPFS") | |
149 | (description "@command{gx} is a packaging tool built around the | |
52beae7b | 150 | distributed, content addressed file system IPFS. It aims to be flexible, |
202c1b97 | 151 | powerful and simple.") |
8c35a6dd | 152 | (license license:expat))) |
e82ae673 PN |
153 | |
154 | (define-public go-github-com-whyrusleeping-gx-util | |
155 | (package | |
156 | (inherit gx) | |
157 | (name "go-github-com-whyrusleeping-gx-util") | |
158 | (arguments | |
159 | '(#:unpack-path "github.com/whyrusleeping/gx" | |
160 | #:import-path "github.com/whyrusleeping/gx/gxutil")))) | |
96b4977a PN |
161 | |
162 | (define-public gx-go | |
163 | (package | |
164 | (name "gx-go") | |
165 | (version "1.9.0") | |
166 | (source | |
167 | (origin | |
168 | (method git-fetch) | |
169 | (uri (git-reference | |
170 | (url "https://github.com/whyrusleeping/gx-go") | |
171 | (commit (string-append "v" version)))) | |
172 | (file-name (git-file-name name version)) | |
173 | (sha256 | |
174 | (base32 | |
175 | "0fdy4b3ymqw6hzvvjwq37mfrdmizc8lxm53axw93n3x6118na9jc")))) | |
176 | (build-system go-build-system) | |
177 | (arguments | |
178 | '(#:import-path "github.com/whyrusleeping/gx-go")) | |
179 | (native-inputs | |
180 | `(("go-github-com-whyrusleeping-gx-util" ,go-github-com-whyrusleeping-gx-util) | |
181 | ("go-github-com-kr-fs" ,go-github-com-kr-fs) | |
182 | ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg) | |
183 | ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api) | |
184 | ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files) | |
185 | ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics) | |
186 | ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto) | |
187 | ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics) | |
188 | ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer) | |
189 | ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol) | |
190 | ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd) | |
191 | ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd) | |
192 | ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir) | |
193 | ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58) | |
194 | ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr) | |
195 | ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net) | |
196 | ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash) | |
197 | ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3) | |
198 | ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils) | |
96b4977a | 199 | ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec) |
35defe61 | 200 | ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf) |
96b4977a PN |
201 | ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore) |
202 | ("go-github-com-urfave-cli" ,go-github-com-urfave-cli) | |
203 | ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter) | |
9c359ff4 | 204 | ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump) |
561d391b | 205 | ("go-golang-org-x-crypto" ,go-golang-org-x-crypto))) |
96b4977a PN |
206 | (home-page "https://github.com/whyrusleeping/gx-go") |
207 | (synopsis "Golang subtool for the @command{gx} package manager") | |
208 | (description "A subtool for the @command{gx} package manager for packages | |
209 | written in Go.") | |
210 | (license license:expat))) | |
505a3854 PN |
211 | |
212 | (define-public go-ipfs | |
213 | (package | |
214 | (name "go-ipfs") | |
cd4fec57 | 215 | (version "0.4.22") |
505a3854 PN |
216 | (source |
217 | (origin | |
5e741ff0 | 218 | (method url-fetch/tarbomb) |
505a3854 PN |
219 | (uri (string-append |
220 | "https://dist.ipfs.io/go-ipfs/v" version | |
221 | "/go-ipfs-source.tar.gz")) | |
222 | (sha256 | |
cd4fec57 | 223 | (base32 "1gyz9yqb4y7p6vdjbcm66nvm6gjs4mdrjygdn79z3misv1pb5nkg")) |
5e741ff0 | 224 | (file-name (string-append name "-" version "-source")))) |
505a3854 PN |
225 | (build-system go-build-system) |
226 | (arguments | |
227 | '(#:unpack-path "github.com/ipfs/go-ipfs" | |
5e741ff0 LC |
228 | #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs" |
229 | #:phases (modify-phases %standard-phases | |
230 | (add-before 'reset-gzip-timestamps 'make-files-writable | |
231 | (lambda* (#:key outputs #:allow-other-keys) | |
232 | ;; Make sure .gz files are writable so that the | |
233 | ;; 'reset-gzip-timestamps' phase can do its work. | |
234 | (let ((out (assoc-ref outputs "out"))) | |
235 | (for-each make-file-writable | |
236 | (find-files out "\\.gz$")) | |
237 | #t)))))) | |
505a3854 PN |
238 | (home-page "https://ipfs.io") |
239 | (synopsis "Go implementation of IPFS, a peer-to-peer hypermedia protocol") | |
52beae7b | 240 | (description "IPFS is a global, versioned, peer-to-peer file system. It |
505a3854 PN |
241 | combines good ideas from Git, BitTorrent, Kademlia, SFS, and the Web. It is |
242 | like a single bittorrent swarm, exchanging git objects. IPFS provides an | |
243 | interface as simple as the HTTP web, but with permanence built in. You can | |
244 | also mount the world at @code{/ipfs}.") | |
245 | (license license:expat))) |