projects/guix·blob ruby-team · refs

78 lines · 3.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2020 Martin Becze <[email protected]>
3;;; Copyright © 2022 Zhu Zihao <[email protected]>
4;;; Copyright © 2024 Efraim Flashner <[email protected]>
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 solidity)
22 #:use-module (gnu packages base)
23 #:use-module (gnu packages boost)
24 #:use-module (gnu packages cpp)
25 #:use-module (gnu packages maths)
26 #:use-module (gnu packages serialization)
27 #:use-module (gnu packages python)
28 #:use-module (gnu packages ncurses)
29 #:use-module (gnu packages pretty-print)
30 #:use-module (guix packages)
31 #:use-module (guix gexp)
32 #:use-module (guix download)
33 #:use-module (guix build-system cmake)
34 #:use-module ((guix licenses) #:prefix license:))
35
36(define-public solidity
37 (package
38 (name "solidity")
39 (version "0.8.25")
40 (source
41 (origin
42 (method url-fetch)
43 (uri
44 (string-append "https://github.com/ethereum/solidity/releases/download/v"
45 version "/solidity_" version ".tar.gz"))
46 (sha256
47 (base32 "0gr7mcrng7lkqx968n48js77kwz7fk8230yj0bhp1vw5hdglpxfy"))))
48 (build-system cmake-build-system)
49 (arguments
50 (list
51 #:configure-flags
52 #~(list "-DSTRICT_Z3_VERSION=OFF")
53 #:phases
54 #~(modify-phases %standard-phases
55 (add-after 'unpack 'unbundle-3rd-party-dependencies
56 (lambda _
57 (substitute* "CMakeLists.txt"
58 (("include\\(fmtlib\\)")
59 "find_package(fmt)")
60 (("include\\(range-v3\\)")
61 "find_package(range-v3)")
62 (("include\\(jsoncpp\\)")
63 "find_package(jsoncpp)"))))
64 (add-after 'unpack 'allow-newer-version-of-jsoncpp
65 (lambda _
66 (substitute* "libsolutil/JSON.cpp"
67 (("JSONCPP_VERSION_PATCH ==") "JSONCPP_VERSION_PATCH >=")))))))
68 (inputs
69 (list boost-static fmt jsoncpp range-v3 z3))
70 (native-inputs
71 (list python ncurses findutils))
72 (home-page "https://solidity.readthedocs.io")
73 (synopsis "Contract-Oriented Programming Language")
74 (description
75 "Solidity is a statically-typed curly-braces programming language
76designed for developing smart contracts that run on the Ethereum Virtual
77Machine.")
78 (license license:gpl3+)))