1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
3 ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
5 ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
7 ;;; This file is part of GNU Guix.
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.
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.
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/>.
22 (define-module (gnu packages ipfs)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages)
25 #:use-module (guix git-download)
26 #:use-module (guix download)
27 #:use-module (guix build-system go)
28 #:use-module (gnu packages golang))
30 (define-public go-github-com-ipfs-go-ipfs-cmdkit-files
32 "386fcf8f18a185ec121676665fe2d9574496048d")
35 (name "go-github-com-ipfs-go-ipfs-cmdkit-files")
36 (version (git-version "1.1.3" revision commit))
41 (url "https://github.com/ipfs/go-ipfs-cmdkit")
43 (file-name (git-file-name name version))
46 "0qk6fshgdmhp8dip2ksm13j6nywi41m9mn0czkvmw6b697z85l2r"))))
47 (build-system go-build-system)
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))))
58 (define-public go-github-com-ipfs-go-ipfs-api
60 "dafc2a13a4389ac1a6c2786e34ab70a4f26d3a3f")
63 (name "go-github-com-ipfs-go-ipfs-api")
64 (version (git-version "1.3.1" revision commit))
69 (url "https://github.com/ipfs/go-ipfs-api")
71 (file-name (git-file-name name version))
74 "06kibnwb037sqynk99j07wm8alvxwx3bari9gdax4jv93396kycj"))))
75 (build-system go-build-system)
77 '(#:import-path "github.com/ipfs/go-ipfs-api"
78 ;; TODO: Tests fail, might need network access.
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)
91 ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
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)
96 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
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))))
114 (url "https://github.com/whyrusleeping/gx")
115 (commit (string-append "v" version))))
116 (file-name (git-file-name name version))
118 (base32 "1sk20kv3rfsnizgwmcmmr69jb1b2iwzqh9wwwd6wg6x0pnqm8swc"))))
119 (build-system go-build-system)
121 '(#:import-path "github.com/whyrusleeping/gx"))
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)
141 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
142 ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
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 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
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
152 distributed, content addressed file system IPFS. It aims to be flexible,
153 powerful and simple.")
154 (license license:expat)))
156 (define-public go-github-com-whyrusleeping-gx-util
159 (name "go-github-com-whyrusleeping-gx-util")
161 '(#:unpack-path "github.com/whyrusleeping/gx"
162 #:import-path "github.com/whyrusleeping/gx/gxutil"))))
172 (url "https://github.com/whyrusleeping/gx-go")
173 (commit (string-append "v" version))))
174 (file-name (git-file-name name version))
177 "0fdy4b3ymqw6hzvvjwq37mfrdmizc8lxm53axw93n3x6118na9jc"))))
178 (build-system go-build-system)
180 '(#:import-path "github.com/whyrusleeping/gx-go"))
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)
201 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
202 ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
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 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
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
212 (license license:expat)))
214 (define-public go-ipfs
220 (method url-fetch/tarbomb)
222 "https://dist.ipfs.io/go-ipfs/v" version
223 "/go-ipfs-source.tar.gz"))
225 (base32 "0k2qzlfz8ks9c70rxsy7jvk6d2s6yll1b8v9k2kcw07r989gxbdq"))
226 (file-name (string-append name "-" version "-source"))))
227 (build-system go-build-system)
229 '(#:unpack-path "github.com/ipfs/go-ipfs"
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$"))
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 file system. It
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)))