ipfs.scm 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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>
  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. (define-module (gnu packages ipfs)
  22. #:use-module ((guix licenses) #:prefix license:)
  23. #:use-module (guix packages)
  24. #:use-module (guix git-download)
  25. #:use-module (guix download)
  26. #:use-module (guix build-system go)
  27. #:use-module (gnu packages golang))
  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")
  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))))
  55. (define-public go-github-com-ipfs-go-ipfs-api
  56. (let ((commit
  57. "dafc2a13a4389ac1a6c2786e34ab70a4f26d3a3f")
  58. (revision "0"))
  59. (package
  60. (name "go-github-com-ipfs-go-ipfs-api")
  61. (version (git-version "1.3.1" revision commit))
  62. (source
  63. (origin
  64. (method git-fetch)
  65. (uri (git-reference
  66. (url "https://github.com/ipfs/go-ipfs-api")
  67. (commit commit)))
  68. (file-name (git-file-name name version))
  69. (sha256
  70. (base32
  71. "06kibnwb037sqynk99j07wm8alvxwx3bari9gdax4jv93396kycj"))))
  72. (build-system go-build-system)
  73. (arguments
  74. '(#:import-path "github.com/ipfs/go-ipfs-api"
  75. ;; TODO: Tests fail, might need network access.
  76. #:tests? #f))
  77. (native-inputs
  78. `(("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
  79. ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
  80. ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
  81. ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
  82. ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
  83. ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
  84. ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
  85. ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
  86. ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
  87. ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
  88. ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
  89. ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
  90. ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
  91. ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
  92. ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
  93. ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
  94. ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
  95. ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
  96. ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
  97. ("go-github-com-cheekybits-is" ,go-github-com-cheekybits-is)))
  98. (home-page "https://github.com/ipfs/go-ipfs-api")
  99. (synopsis "Unofficial Go interface to IPFS's HTTP API")
  100. (description "An unofficial Go interface to IPFS's HTTP API")
  101. (license license:expat))))
  102. (define-public gx
  103. (package
  104. (name "gx")
  105. (version "0.14.3")
  106. (source
  107. (origin
  108. (method git-fetch)
  109. (uri (git-reference
  110. (url "https://github.com/whyrusleeping/gx")
  111. (commit (string-append "v" version))))
  112. (file-name (git-file-name name version))
  113. (sha256
  114. (base32 "1sk20kv3rfsnizgwmcmmr69jb1b2iwzqh9wwwd6wg6x0pnqm8swc"))))
  115. (build-system go-build-system)
  116. (arguments
  117. '(#:import-path "github.com/whyrusleeping/gx"))
  118. (native-inputs
  119. `(("go-github-com-blang-semver" ,go-github-com-blang-semver)
  120. ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
  121. ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api)
  122. ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
  123. ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
  124. ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
  125. ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
  126. ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
  127. ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
  128. ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
  129. ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
  130. ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
  131. ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
  132. ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
  133. ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
  134. ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
  135. ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
  136. ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
  137. ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
  138. ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
  139. ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
  140. ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
  141. ("go-github-com-whyrusleeping-json-filter" ,go-github-com-whyrusleeping-json-filter)
  142. ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
  143. ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)
  144. ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
  145. (home-page "https://github.com/whyrusleeping/gx")
  146. (synopsis "Package management tool using IPFS")
  147. (description "@command{gx} is a packaging tool built around the
  148. distributed, content addressed file system IPFS. It aims to be flexible,
  149. powerful and simple.")
  150. (license license:expat)))
  151. (define-public go-github-com-whyrusleeping-gx-util
  152. (package
  153. (inherit gx)
  154. (name "go-github-com-whyrusleeping-gx-util")
  155. (arguments
  156. '(#:unpack-path "github.com/whyrusleeping/gx"
  157. #:import-path "github.com/whyrusleeping/gx/gxutil"))))
  158. (define-public gx-go
  159. (package
  160. (name "gx-go")
  161. (version "1.9.0")
  162. (source
  163. (origin
  164. (method git-fetch)
  165. (uri (git-reference
  166. (url "https://github.com/whyrusleeping/gx-go")
  167. (commit (string-append "v" version))))
  168. (file-name (git-file-name name version))
  169. (sha256
  170. (base32
  171. "0fdy4b3ymqw6hzvvjwq37mfrdmizc8lxm53axw93n3x6118na9jc"))))
  172. (build-system go-build-system)
  173. (arguments
  174. '(#:import-path "github.com/whyrusleeping/gx-go"))
  175. (native-inputs
  176. `(("go-github-com-whyrusleeping-gx-util" ,go-github-com-whyrusleeping-gx-util)
  177. ("go-github-com-kr-fs" ,go-github-com-kr-fs)
  178. ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
  179. ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api)
  180. ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
  181. ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
  182. ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
  183. ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
  184. ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
  185. ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
  186. ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
  187. ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
  188. ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
  189. ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
  190. ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
  191. ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
  192. ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
  193. ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
  194. ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
  195. ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
  196. ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
  197. ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
  198. ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
  199. ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
  200. ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)
  201. ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
  202. (home-page "https://github.com/whyrusleeping/gx-go")
  203. (synopsis "Golang subtool for the @command{gx} package manager")
  204. (description "A subtool for the @command{gx} package manager for packages
  205. written in Go.")
  206. (license license:expat)))
  207. (define-public go-ipfs
  208. (package
  209. (name "go-ipfs")
  210. (version "0.8.0")
  211. (source
  212. (origin
  213. (method url-fetch/tarbomb)
  214. (uri (string-append
  215. "https://dist.ipfs.io/go-ipfs/v" version
  216. "/go-ipfs-source.tar.gz"))
  217. (sha256
  218. (base32 "0k2qzlfz8ks9c70rxsy7jvk6d2s6yll1b8v9k2kcw07r989gxbdq"))
  219. (file-name (string-append name "-" version "-source"))))
  220. (build-system go-build-system)
  221. (arguments
  222. '(#:unpack-path "github.com/ipfs/go-ipfs"
  223. #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs"
  224. #:phases (modify-phases %standard-phases
  225. (add-before 'reset-gzip-timestamps 'make-files-writable
  226. (lambda* (#:key outputs #:allow-other-keys)
  227. ;; Make sure .gz files are writable so that the
  228. ;; 'reset-gzip-timestamps' phase can do its work.
  229. (let ((out (assoc-ref outputs "out")))
  230. (for-each make-file-writable
  231. (find-files out "\\.gz$"))
  232. #t))))))
  233. (home-page "https://ipfs.io")
  234. (synopsis "Go implementation of IPFS, a peer-to-peer hypermedia protocol")
  235. (description "IPFS is a global, versioned, peer-to-peer file system. It
  236. combines good ideas from Git, BitTorrent, Kademlia, SFS, and the Web. It is
  237. like a single bittorrent swarm, exchanging git objects. IPFS provides an
  238. interface as simple as the HTTP web, but with permanence built in. You can
  239. also mount the world at @code{/ipfs}.")
  240. (license license:expat)))