Commit | Line | Data |
---|---|---|
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> |
94dddc8b | 5 | ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de> |
247b1bd2 PN |
6 | ;;; |
7 | ;;; This file is part of GNU Guix. | |
8 | ;;; | |
9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
10 | ;;; under the terms of the GNU General Public License as published by | |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
14 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
21 | ||
22 | (define-module (gnu packages ipfs) | |
23 | #:use-module ((guix licenses) #:prefix license:) | |
24 | #:use-module (guix packages) | |
25 | #:use-module (guix git-download) | |
505a3854 | 26 | #:use-module (guix download) |
247b1bd2 PN |
27 | #:use-module (guix build-system go) |
28 | #:use-module (gnu packages golang)) | |
29 | ||
30 | (define-public go-github-com-ipfs-go-ipfs-cmdkit-files | |
31 | (let ((commit | |
32 | "386fcf8f18a185ec121676665fe2d9574496048d") | |
33 | (revision "0")) | |
34 | (package | |
35 | (name "go-github-com-ipfs-go-ipfs-cmdkit-files") | |
36 | (version (git-version "1.1.3" revision commit)) | |
37 | (source | |
38 | (origin | |
39 | (method git-fetch) | |
40 | (uri (git-reference | |
b0e7b699 | 41 | (url "https://github.com/ipfs/go-ipfs-cmdkit") |
247b1bd2 PN |
42 | (commit commit))) |
43 | (file-name (git-file-name name version)) | |
44 | (sha256 | |
45 | (base32 | |
46 | "0qk6fshgdmhp8dip2ksm13j6nywi41m9mn0czkvmw6b697z85l2r")))) | |
47 | (build-system go-build-system) | |
48 | (arguments | |
49 | '(#:unpack-path "github.com/ipfs/go-ipfs-cmdkit" | |
50 | #:import-path "github.com/ipfs/go-ipfs-cmdkit/files")) | |
51 | (home-page "https://github.com/ipfs/go-ipfs-cmdkit") | |
52 | (synopsis "Shared types, functions and values for go-ipfs") | |
53 | (description "@command{cmdkit} offers some types, functions and values | |
54 | that are shared between @command{go-ipfs/commands} and its rewrite | |
55 | @command{go-ipfs-cmds}.") | |
56 | (license license:expat)))) | |
566f13f8 PN |
57 | |
58 | (define-public go-github-com-ipfs-go-ipfs-api | |
59 | (let ((commit | |
60 | "dafc2a13a4389ac1a6c2786e34ab70a4f26d3a3f") | |
61 | (revision "0")) | |
62 | (package | |
63 | (name "go-github-com-ipfs-go-ipfs-api") | |
64 | (version (git-version "1.3.1" revision commit)) | |
65 | (source | |
66 | (origin | |
67 | (method git-fetch) | |
68 | (uri (git-reference | |
b0e7b699 | 69 | (url "https://github.com/ipfs/go-ipfs-api") |
566f13f8 PN |
70 | (commit commit))) |
71 | (file-name (git-file-name name version)) | |
72 | (sha256 | |
73 | (base32 | |
74 | "06kibnwb037sqynk99j07wm8alvxwx3bari9gdax4jv93396kycj")))) | |
75 | (build-system go-build-system) | |
76 | (arguments | |
77 | '(#:import-path "github.com/ipfs/go-ipfs-api" | |
78 | ;; TODO: Tests fail, might need network access. | |
79 | #:tests? #f)) | |
80 | (native-inputs | |
81 | `(("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files) | |
82 | ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics) | |
83 | ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics) | |
84 | ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer) | |
85 | ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol) | |
86 | ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto) | |
87 | ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir) | |
88 | ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr) | |
89 | ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net) | |
90 | ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec) | |
35defe61 | 91 | ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf) |
566f13f8 PN |
92 | ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd) |
93 | ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd) | |
94 | ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58) | |
95 | ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash) | |
561d391b | 96 | ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) |
566f13f8 PN |
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)))) | |
202c1b97 PN |
105 | |
106 | (define-public gx | |
8c35a6dd TGR |
107 | (package |
108 | (name "gx") | |
d64d8abb | 109 | (version "0.14.3") |
8c35a6dd TGR |
110 | (source |
111 | (origin | |
112 | (method git-fetch) | |
113 | (uri (git-reference | |
b0e7b699 | 114 | (url "https://github.com/whyrusleeping/gx") |
8c35a6dd TGR |
115 | (commit (string-append "v" version)))) |
116 | (file-name (git-file-name name version)) | |
117 | (sha256 | |
d64d8abb | 118 | (base32 "1sk20kv3rfsnizgwmcmmr69jb1b2iwzqh9wwwd6wg6x0pnqm8swc")))) |
8c35a6dd TGR |
119 | (build-system go-build-system) |
120 | (arguments | |
121 | '(#:import-path "github.com/whyrusleeping/gx")) | |
122 | (native-inputs | |
123 | `(("go-github-com-blang-semver" ,go-github-com-blang-semver) | |
124 | ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg) | |
125 | ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api) | |
126 | ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files) | |
127 | ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics) | |
128 | ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto) | |
129 | ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics) | |
130 | ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer) | |
131 | ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol) | |
132 | ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd) | |
133 | ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd) | |
134 | ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir) | |
135 | ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58) | |
136 | ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr) | |
137 | ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net) | |
138 | ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash) | |
139 | ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3) | |
140 | ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils) | |
8c35a6dd | 141 | ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec) |
35defe61 | 142 | ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf) |
8c35a6dd TGR |
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) | |
9c359ff4 | 147 | ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump) |
561d391b | 148 | ("go-golang-org-x-crypto" ,go-golang-org-x-crypto))) |
8c35a6dd TGR |
149 | (home-page "https://github.com/whyrusleeping/gx") |
150 | (synopsis "Package management tool using IPFS") | |
151 | (description "@command{gx} is a packaging tool built around the | |
52beae7b | 152 | distributed, content addressed file system IPFS. It aims to be flexible, |
202c1b97 | 153 | powerful and simple.") |
8c35a6dd | 154 | (license license:expat))) |
e82ae673 PN |
155 | |
156 | (define-public go-github-com-whyrusleeping-gx-util | |
157 | (package | |
158 | (inherit gx) | |
159 | (name "go-github-com-whyrusleeping-gx-util") | |
160 | (arguments | |
161 | '(#:unpack-path "github.com/whyrusleeping/gx" | |
162 | #:import-path "github.com/whyrusleeping/gx/gxutil")))) | |
96b4977a PN |
163 | |
164 | (define-public gx-go | |
165 | (package | |
166 | (name "gx-go") | |
167 | (version "1.9.0") | |
168 | (source | |
169 | (origin | |
170 | (method git-fetch) | |
171 | (uri (git-reference | |
172 | (url "https://github.com/whyrusleeping/gx-go") | |
173 | (commit (string-append "v" version)))) | |
174 | (file-name (git-file-name name version)) | |
175 | (sha256 | |
176 | (base32 | |
177 | "0fdy4b3ymqw6hzvvjwq37mfrdmizc8lxm53axw93n3x6118na9jc")))) | |
178 | (build-system go-build-system) | |
179 | (arguments | |
180 | '(#:import-path "github.com/whyrusleeping/gx-go")) | |
181 | (native-inputs | |
182 | `(("go-github-com-whyrusleeping-gx-util" ,go-github-com-whyrusleeping-gx-util) | |
183 | ("go-github-com-kr-fs" ,go-github-com-kr-fs) | |
184 | ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg) | |
185 | ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api) | |
186 | ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files) | |
187 | ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics) | |
188 | ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto) | |
189 | ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics) | |
190 | ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer) | |
191 | ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol) | |
192 | ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd) | |
193 | ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd) | |
194 | ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir) | |
195 | ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58) | |
196 | ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr) | |
197 | ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net) | |
198 | ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash) | |
199 | ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3) | |
200 | ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils) | |
96b4977a | 201 | ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec) |
35defe61 | 202 | ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf) |
96b4977a PN |
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) | |
9c359ff4 | 206 | ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump) |
561d391b | 207 | ("go-golang-org-x-crypto" ,go-golang-org-x-crypto))) |
96b4977a PN |
208 | (home-page "https://github.com/whyrusleeping/gx-go") |
209 | (synopsis "Golang subtool for the @command{gx} package manager") | |
210 | (description "A subtool for the @command{gx} package manager for packages | |
211 | written in Go.") | |
212 | (license license:expat))) | |
505a3854 PN |
213 | |
214 | (define-public go-ipfs | |
215 | (package | |
216 | (name "go-ipfs") | |
94dddc8b | 217 | (version "0.8.0") |
505a3854 PN |
218 | (source |
219 | (origin | |
5e741ff0 | 220 | (method url-fetch/tarbomb) |
505a3854 PN |
221 | (uri (string-append |
222 | "https://dist.ipfs.io/go-ipfs/v" version | |
223 | "/go-ipfs-source.tar.gz")) | |
224 | (sha256 | |
94dddc8b | 225 | (base32 "0k2qzlfz8ks9c70rxsy7jvk6d2s6yll1b8v9k2kcw07r989gxbdq")) |
5e741ff0 | 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") | |
52beae7b | 242 | (description "IPFS is a global, versioned, peer-to-peer file system. It |
505a3854 PN |
243 | combines good ideas from Git, BitTorrent, Kademlia, SFS, and the Web. It is |
244 | like a single bittorrent swarm, exchanging git objects. IPFS provides an | |
245 | interface as simple as the HTTP web, but with permanence built in. You can | |
246 | also mount the world at @code{/ipfs}.") | |
247 | (license license:expat))) |