ipfs.scm 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
  3. ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
  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. (define-module (gnu packages ipfs)
  20. #:use-module ((guix licenses) #:prefix license:)
  21. #:use-module (guix packages)
  22. #:use-module (guix git-download)
  23. #:use-module (guix download)
  24. #:use-module (guix build-system go)
  25. #:use-module (gnu packages golang))
  26. (define-public go-github-com-ipfs-go-ipfs-cmdkit-files
  27. (let ((commit
  28. "386fcf8f18a185ec121676665fe2d9574496048d")
  29. (revision "0"))
  30. (package
  31. (name "go-github-com-ipfs-go-ipfs-cmdkit-files")
  32. (version (git-version "1.1.3" revision commit))
  33. (source
  34. (origin
  35. (method git-fetch)
  36. (uri (git-reference
  37. (url "https://github.com/ipfs/go-ipfs-cmdkit.git")
  38. (commit commit)))
  39. (file-name (git-file-name name version))
  40. (sha256
  41. (base32
  42. "0qk6fshgdmhp8dip2ksm13j6nywi41m9mn0czkvmw6b697z85l2r"))))
  43. (build-system go-build-system)
  44. (arguments
  45. '(#:unpack-path "github.com/ipfs/go-ipfs-cmdkit"
  46. #:import-path "github.com/ipfs/go-ipfs-cmdkit/files"))
  47. (home-page "https://github.com/ipfs/go-ipfs-cmdkit")
  48. (synopsis "Shared types, functions and values for go-ipfs")
  49. (description "@command{cmdkit} offers some types, functions and values
  50. that are shared between @command{go-ipfs/commands} and its rewrite
  51. @command{go-ipfs-cmds}.")
  52. (license license:expat))))
  53. (define-public go-github-com-ipfs-go-ipfs-api
  54. (let ((commit
  55. "dafc2a13a4389ac1a6c2786e34ab70a4f26d3a3f")
  56. (revision "0"))
  57. (package
  58. (name "go-github-com-ipfs-go-ipfs-api")
  59. (version (git-version "1.3.1" revision commit))
  60. (source
  61. (origin
  62. (method git-fetch)
  63. (uri (git-reference
  64. (url "https://github.com/ipfs/go-ipfs-api.git")
  65. (commit commit)))
  66. (file-name (git-file-name name version))
  67. (sha256
  68. (base32
  69. "06kibnwb037sqynk99j07wm8alvxwx3bari9gdax4jv93396kycj"))))
  70. (build-system go-build-system)
  71. (arguments
  72. '(#:import-path "github.com/ipfs/go-ipfs-api"
  73. ;; TODO: Tests fail, might need network access.
  74. #:tests? #f))
  75. (native-inputs
  76. `(("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
  77. ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
  78. ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
  79. ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
  80. ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
  81. ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
  82. ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
  83. ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
  84. ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
  85. ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
  86. ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
  87. ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
  88. ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
  89. ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
  90. ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
  91. ("go-golang-org-x-crypto-union" ,(go-golang-org-x-crypto-union))
  92. ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
  93. ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
  94. ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
  95. ("go-github-com-cheekybits-is" ,go-github-com-cheekybits-is)))
  96. (home-page "https://github.com/ipfs/go-ipfs-api")
  97. (synopsis "Unofficial Go interface to IPFS's HTTP API")
  98. (description "An unofficial Go interface to IPFS's HTTP API")
  99. (license license:expat))))
  100. (define-public gx
  101. (package
  102. (name "gx")
  103. (version "0.14.1")
  104. (source
  105. (origin
  106. (method git-fetch)
  107. (uri (git-reference
  108. (url "https://github.com/whyrusleeping/gx.git")
  109. (commit (string-append "v" version))))
  110. (file-name (git-file-name name version))
  111. (sha256
  112. (base32
  113. "0pfx2p59xdbmqzfbgaf8xvlnzh8m05hkg596glq5kvl8ib65i4ha"))))
  114. (build-system go-build-system)
  115. (arguments
  116. '(#:import-path "github.com/whyrusleeping/gx"))
  117. (native-inputs
  118. `(("go-github-com-blang-semver" ,go-github-com-blang-semver)
  119. ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
  120. ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api)
  121. ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
  122. ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
  123. ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
  124. ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
  125. ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
  126. ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
  127. ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
  128. ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
  129. ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
  130. ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
  131. ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
  132. ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
  133. ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
  134. ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
  135. ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
  136. ("go-golang-org-x-crypto-union" ,(go-golang-org-x-crypto-union))
  137. ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
  138. ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
  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. (home-page "https://github.com/whyrusleeping/gx")
  145. (synopsis "Package management tool using IPFS")
  146. (description "@command{gx} is a packaging tool built around the
  147. distributed, content addressed filesystem IPFS. It aims to be flexible,
  148. powerful and simple.")
  149. (license license:expat)))
  150. (define-public go-github-com-whyrusleeping-gx-util
  151. (package
  152. (inherit gx)
  153. (name "go-github-com-whyrusleeping-gx-util")
  154. (arguments
  155. '(#:unpack-path "github.com/whyrusleeping/gx"
  156. #:import-path "github.com/whyrusleeping/gx/gxutil"))))
  157. (define-public gx-go
  158. (package
  159. (name "gx-go")
  160. (version "1.9.0")
  161. (source
  162. (origin
  163. (method git-fetch)
  164. (uri (git-reference
  165. (url "https://github.com/whyrusleeping/gx-go")
  166. (commit (string-append "v" version))))
  167. (file-name (git-file-name name version))
  168. (sha256
  169. (base32
  170. "0fdy4b3ymqw6hzvvjwq37mfrdmizc8lxm53axw93n3x6118na9jc"))))
  171. (build-system go-build-system)
  172. (arguments
  173. '(#:import-path "github.com/whyrusleeping/gx-go"))
  174. (native-inputs
  175. `(("go-github-com-whyrusleeping-gx-util" ,go-github-com-whyrusleeping-gx-util)
  176. ("go-github-com-kr-fs" ,go-github-com-kr-fs)
  177. ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
  178. ("go-github-com-ipfs-go-ipfs-api" ,go-github-com-ipfs-go-ipfs-api)
  179. ("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
  180. ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
  181. ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
  182. ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
  183. ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
  184. ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
  185. ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
  186. ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
  187. ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
  188. ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
  189. ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
  190. ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
  191. ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
  192. ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
  193. ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
  194. ("go-golang-org-x-crypto-union" ,(go-golang-org-x-crypto-union))
  195. ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
  196. ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
  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. (home-page "https://github.com/whyrusleeping/gx-go")
  202. (synopsis "Golang subtool for the @command{gx} package manager")
  203. (description "A subtool for the @command{gx} package manager for packages
  204. written in Go.")
  205. (license license:expat)))
  206. (define-public go-ipfs
  207. (package
  208. (name "go-ipfs")
  209. (version "0.4.18")
  210. (source
  211. (origin
  212. (method url-fetch/tarbomb)
  213. (uri (string-append
  214. "https://dist.ipfs.io/go-ipfs/v" version
  215. "/go-ipfs-source.tar.gz"))
  216. (sha256
  217. (base32
  218. "19hfgbyn5sr1bw0cwm3gsjz0w3b3vh3mmkax1906raah30lavj1x"))
  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 filesystem. 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)))