gnu: Add gx-go.
[jackhill/guix/guix.git] / gnu / packages / ipfs.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
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 build-system go)
24 #:use-module (gnu packages golang))
25
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
54 (define-public go-github-com-ipfs-go-ipfs-api
55 (let ((commit
56 "dafc2a13a4389ac1a6c2786e34ab70a4f26d3a3f")
57 (revision "0"))
58 (package
59 (name "go-github-com-ipfs-go-ipfs-api")
60 (version (git-version "1.3.1" revision commit))
61 (source
62 (origin
63 (method git-fetch)
64 (uri (git-reference
65 (url "https://github.com/ipfs/go-ipfs-api.git")
66 (commit commit)))
67 (file-name (git-file-name name version))
68 (sha256
69 (base32
70 "06kibnwb037sqynk99j07wm8alvxwx3bari9gdax4jv93396kycj"))))
71 (build-system go-build-system)
72 (arguments
73 '(#:import-path "github.com/ipfs/go-ipfs-api"
74 ;; TODO: Tests fail, might need network access.
75 #:tests? #f))
76 (native-inputs
77 `(("go-github-com-ipfs-go-ipfs-cmdkit-files" ,go-github-com-ipfs-go-ipfs-cmdkit-files)
78 ("go-github-com-libp2p-go-libp2p-metrics" ,go-github-com-libp2p-go-libp2p-metrics)
79 ("go-github-com-libp2p-go-flow-metrics" ,go-github-com-libp2p-go-flow-metrics)
80 ("go-github-com-libp2p-go-libp2p-peer" ,go-github-com-libp2p-go-libp2p-peer)
81 ("go-github-com-libp2p-go-libp2p-protocol" ,go-github-com-libp2p-go-libp2p-protocol)
82 ("go-github-com-libp2p-go-libp2p-crypto" ,go-github-com-libp2p-go-libp2p-crypto)
83 ("go-github-com-mitchellh-go-homedir" ,go-github-com-mitchellh-go-homedir)
84 ("go-github-com-multiformats-go-multiaddr" ,go-github-com-multiformats-go-multiaddr)
85 ("go-github-com-multiformats-go-multiaddr-net" ,go-github-com-multiformats-go-multiaddr-net)
86 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
87 ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
88 ("go-github-com-minio-blake2b-simd" ,go-github-com-minio-blake2b-simd)
89 ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
90 ("go-github-com-mr-tron-base58" ,go-github-com-mr-tron-base58)
91 ("go-github-com-multiformats-go-multihash" ,go-github-com-multiformats-go-multihash)
92 ("go-golang-org-x-crypto-union" ,(go-golang-org-x-crypto-union))
93 ("go-github-com-spaolacci-murmur3" ,go-github-com-spaolacci-murmur3)
94 ("go-github-com-gxed-hashland-keccakpg" ,go-github-com-gxed-hashland-keccakpg)
95 ("go-github-com-whyrusleeping-tar-utils" ,go-github-com-whyrusleeping-tar-utils)
96 ("go-github-com-cheekybits-is" ,go-github-com-cheekybits-is)))
97 (home-page "https://github.com/ipfs/go-ipfs-api")
98 (synopsis "Unofficial Go interface to IPFS's HTTP API")
99 (description "An unofficial Go interface to IPFS's HTTP API")
100 (license license:expat))))
101
102 (define-public gx
103 (let ((commit
104 "89338e509426d2895f20086685cf4c77d64cc5df")
105 (revision "0"))
106 (package
107 (name "gx")
108 (version (git-version "0.14.0" revision commit))
109 (source
110 (origin
111 (method git-fetch)
112 (uri (git-reference
113 (url "https://github.com/whyrusleeping/gx.git")
114 (commit commit)))
115 (file-name (git-file-name name version))
116 (sha256
117 (base32
118 "08gh04jln8rxpq0j4fm4chjap162wp8cjwj9szbvj9c7123s42rd"))))
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)
141 ("go-golang-org-x-crypto-union" ,(go-golang-org-x-crypto-union))
142 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
143 ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
144 ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
145 ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
146 ("go-github-com-whyrusleeping-json-filter" ,go-github-com-whyrusleeping-json-filter)
147 ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
148 ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)))
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 filesystem IPFS. It aims to be flexible,
153 powerful and simple.")
154 (license license:expat))))
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"))))
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)
201 ("go-golang-org-x-crypto-union" ,(go-golang-org-x-crypto-union))
202 ("go-github-com-btcsuite-btcd-btcec" ,go-github-com-btcsuite-btcd-btcec)
203 ("go-github-com-gogo-protobuf-proto" ,go-github-com-gogo-protobuf-proto)
204 ("go-github-com-sabhiram-go-gitignore" ,go-github-com-sabhiram-go-gitignore)
205 ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
206 ("go-github-com-whyrusleeping-progmeter" ,go-github-com-whyrusleeping-progmeter)
207 ("go-github-com-whyrusleeping-stump" ,go-github-com-whyrusleeping-stump)))
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)))