gnu: python-language-server: Build with python-jedi@0.15.2.
[jackhill/guix/guix.git] / gnu / packages / hyperledger.scm
CommitLineData
98355069 1;;; GNU Guix --- Functional package management for GNU
37109658 2;;; Copyright © 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
cf311790 3;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
04ff192e 4;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
98355069
PN
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages hyperledger)
22 #:use-module (ice-9 match)
04ff192e 23 #:use-module (guix build-system cmake)
98355069 24 #:use-module (guix build-system go)
98355069
PN
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix git-download)
28 #:use-module (guix licenses)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages base)
04ff192e
PN
31 #:use-module (gnu packages boost)
32 #:use-module (gnu packages check)
98355069 33 #:use-module (gnu packages curl)
04ff192e 34 #:use-module (gnu packages databases)
98355069
PN
35 #:use-module (gnu packages docker)
36 #:use-module (gnu packages golang)
04ff192e
PN
37 #:use-module (gnu packages logging)
38 #:use-module (gnu packages machine-learning)
39 #:use-module (gnu packages popt)
40 #:use-module (gnu packages pretty-print)
41 #:use-module (gnu packages protobuf)
42 #:use-module (gnu packages tbb)
43 #:use-module (gnu packages version-control)
44 #:use-module (gnu packages web))
98355069
PN
45
46(define-public hyperledger-fabric
47 (package
48 (name "hyperledger-fabric")
cf311790 49 (version "1.4.0")
98355069
PN
50 ;; While the GitHub repository is supposed to be "just a mirror," the Go
51 ;; imports refer to it explicitly.
52 (home-page "https://github.com/hyperledger/fabric")
53 (source (origin
54 (method git-fetch)
55 (uri (git-reference
56 (url home-page)
cf311790
TGR
57 ;; ‘release-…’ are branches, and move. ‘v…’ are the tags.
58 (commit (string-append "v" version))))
98355069
PN
59 (sha256
60 (base32
cf311790 61 "0nmg24ishwddxm1i2vh5ah5ylmmcg0apnjbgv1hljvhl48k4pzxq"))
98355069
PN
62 (file-name (git-file-name name version))))
63 (build-system go-build-system)
64 (native-inputs
65 `(("which" ,which)
66 ("docker-cli" ,docker-cli)
67 ("git" ,git)
68 ("curl" ,curl)))
69 (arguments
70 `(#:import-path "github.com/hyperledger/fabric"
71 #:unpack-path "github.com/hyperledger/fabric"
72 ;; We don't need to install the source code for end-user applications.
73 #:install-source? #f
74 ;; TODO: Tests require a running Docker daemon.
75 #:tests? #f
76 #:phases
77 (modify-phases %standard-phases
78 (replace 'build
79 (lambda _
80 ;; Only linux-amd64 and linux-ppc64le seem to be supported at the moment.
2b613a1a
PN
81 (invoke "make"
82 "-j" (number->string (parallel-job-count))
83 "-C" "src/github.com/hyperledger/fabric"
98355069
PN
84 "release/linux-amd64")))
85 (add-after 'install 'install-commands
86 (lambda* (#:key outputs #:allow-other-keys)
87 (let ((out (assoc-ref outputs "out"))
88 (src "src/github.com/hyperledger/fabric/"))
89 (with-directory-excursion src
90 (copy-recursively
91 "release/linux-amd64/bin"
92 (string-append out "/bin"))
93 (install-file "LICENSE"
94 (string-append out "/share/licenses"))
95 (install-file "README.md"
96 (string-append out "/share/doc"))
97 (copy-recursively "sampleconfig"
98 (string-append out "/etc/hyperledger/fabric"))))
99 #t)))))
2b613a1a 100 (supported-systems '("x86_64-linux"))
98355069 101 (synopsis "Platform for distributed ledger solutions")
2b613a1a
PN
102 (description "Hyperledger Fabric is a platform for distributed ledger
103solutions, underpinned by a modular architecture focusing on confidentiality
104and resiliency. It is designed to support pluggable implementations of
105different components.")
98355069 106 (license asl2.0)))
37109658
PN
107
108(define-public hyperledger-iroha-ed25519
109 (package
110 (name "hyperledger-iroha-ed25519")
111 (version "2.0.2")
112 (home-page "https://github.com/hyperledger/iroha-ed25519")
113 (source (origin
114 (method git-fetch)
115 (uri (git-reference
116 (url home-page)
117 (commit version)))
118 (file-name (git-file-name name version))
119 (sha256
120 (base32
121 "0kr1zwah8mhnpfrpk3h6hdafyqdl3ixhs7czdfscqv6vxqfiabc4"))))
122 (build-system cmake-build-system)
123 (native-inputs
124 `(("googletest" ,googletest)))
125 (arguments
126 `(#:tests? #f ; Tests don't build because CMake cannot find GTest main.
127 #:configure-flags '("-DHUNTER_ENABLED=OFF"
128 "-DBUILD=SHARED"
129 ;; TODO: x86_64 should use amd64-64-24k-pic but it
130 ;; fails to link when built as a shared library.
131 "-DEDIMPL=ref10"
132 "-DHASH=sha3_brainhub")))
133 (synopsis "Ed25519 digital signature algorithm")
134 (description "This repository aims to provide modularized implementation
135of the Ed25519 digital signature algorithm which is is described in
136RFC8032 (@url{https://tools.ietf.org/html/rfc8032}).
137
138Originally Ed25519 consists of three modules:
139
140@itemize
141@item digital signature algorithm itself
142@item SHA512 hash function
143@item random number generator, to generate keypairs
144@end itemize
145
146This project offers at least two different C implementations for every
147module. Every implementation can be replaced with another one at
148link-time. New implementations can be added as well.")
149 (license asl2.0)))
04ff192e
PN
150
151(define-public hyperledger-iroha
152 (package
153 (name "hyperledger-iroha")
154 (version "1.1.1")
155 (home-page "https://github.com/hyperledger/iroha")
156 (source (origin
157 (method git-fetch)
158 (uri (git-reference
159 (url home-page)
160 (commit version)))
161 (file-name (git-file-name name version))
162 (sha256
163 (base32
164 "014mbwq059yxwihw0mq8zgns53fsw8ckczi1lw8q9pz3pk86pa9b"))
165 (modules '((guix build utils)))
166 (snippet
167 '(begin
168 ;; https://github.com/hyperledger/iroha/commit/4dc710d2e9a067af866771318f673c7392797e48
169 ;; Backport unversioned fmt dependency, remove next update:
170 (substitute* "libs/logger/logger.hpp"
171 (("fmt::v5") "fmt"))
172 #t))))
173 (build-system cmake-build-system)
174 (arguments
175 `(#:configure-flags
176 '("-DTESTING=OFF" ; The tests fail to link correctly to googletest.
177 ;; Don't install the shared libraries of the dependencies:
178 "-DENABLE_LIBS_PACKAGING=OFF")
179 #:tests? #f
180 ;; https://iroha.readthedocs.io/en/latest/build/index.html#running-tests-optional
181 #:test-target "."))
182 ;; https://github.com/hyperledger/iroha/blob/master/vcpkg/VCPKG_DEPS_LIST
183 (native-inputs
184 `(("fmt" ,fmt)
185 ("googletest" ,googletest)
186 ("rapidjson" ,rapidjson)
187 ("rxcpp" ,rxcpp)
188 ("spdlog" ,spdlog)))
189 (inputs
190 `(("boost" ,boost-1.69)
191 ("gflags" ,gflags)
192 ("grpc" ,grpc)
193 ("hyperledger-iroha-ed25519" ,hyperledger-iroha-ed25519)
194 ("postgresql" ,postgresql)
195 ("protobuf" ,protobuf)
196 ("soci" ,soci)
197 ("tbb" ,tbb)))
198 (synopsis "Simple, decentralized ledger")
199 (description "Iroha is a distributed ledger technology (DLT). Iroha has
200essential functionality for your asset, information and identity management
201needs, at the same time being a crash fault-tolerant tool.
202
203Iroha has the following features:
204
205@itemize
206@item Creation and management of custom fungible assets, such as currencies,
207kilos of gold, etc.
208@item Management of user accounts
209@item Taxonomy of accounts based on domains in the system
210@item The system of rights and verification of user permissions for the
211execution of transactions and queries in the system
212@item Validation of business rules for transactions and queries in the system
213@item Multisignature transactions
214@end itemize\n")
215 (license asl2.0)))