Archived
1
0
Fork 0

gnu: solidity: Update to 0.8.15.

* gnu/packages/solidity.scm (solidity): Update to 0.8.15.
[source]: Use Github release.
[arguments]<#:phases>: Remove phase 'create-commit_hash.txt'.
Restore phase 'configure' and phase 'install'.
Remove modifications applied to the phase 'build' and phase 'check'.
Add phase 'unbundle-3rd-party-dependencies'.
[inputs]: Add fmt-for-solidity, range-v3.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Zhu Zihao 2022-07-03 17:39:27 +08:00 committed by Ludovic Courtès
parent b49c2e558d
commit 84d413d2fd
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -19,72 +19,52 @@
(define-module (gnu packages solidity) (define-module (gnu packages solidity)
#:use-module (gnu packages base) #:use-module (gnu packages base)
#:use-module (gnu packages boost) #:use-module (gnu packages boost)
#:use-module (gnu packages cpp)
#:use-module (gnu packages maths) #:use-module (gnu packages maths)
#:use-module (gnu packages serialization) #:use-module (gnu packages serialization)
#:use-module (gnu packages python) #:use-module (gnu packages python)
#:use-module (gnu packages ncurses) #:use-module (gnu packages ncurses)
#:use-module (gnu packages pretty-print)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (guix git-download) #:use-module (guix download)
#:use-module (guix build-system cmake) #:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:)) #:use-module ((guix licenses) #:prefix license:))
(define-public solidity (define-public solidity
(let ((commit "3f05b770bdbf60eca866382049ea191dd701409a")) (package
(package (name "solidity")
(name "solidity") (version "0.8.15")
(version "0.7.4") (source
(source (origin
(origin (method url-fetch)
(method git-fetch) (uri
(uri (string-append "https://github.com/ethereum/solidity/releases/download/v"
(git-reference version "/solidity_" version ".tar.gz"))
(url "https://github.com/ethereum/solidity") (sha256
(commit commit))) (base32 "0j9a8y5fizarl9yhbnwvd0x1nm6qsbskqb7j1fwsyqx47w5sa82p"))))
(file-name (git-file-name name version)) (build-system cmake-build-system)
(sha256 (arguments
(base32 "1mswhjymiwnd3n7h3sjvjx5x8223yih0yvfcr0zpqr4aizpfx5z8")))) (list
(build-system cmake-build-system) #:phases
(arguments #~(modify-phases %standard-phases
(list #:phases (add-after 'unpack 'unbundle-3rd-party-dependencies
#~(modify-phases %standard-phases (lambda _
(add-after 'unpack 'create-commit_hash.txt (substitute* "CMakeLists.txt"
(lambda _ (("include\\(fmtlib\\)")
(with-output-to-file "commit_hash.txt" "find_package(fmt)")
(lambda _ (("include\\(range-v3\\)")
(display "find_package(range-v3)")
(substring #$commit 0 8)))))) (("include\\(jsoncpp\\)")
(delete 'configure) "find_package(jsoncpp)")))))))
(delete 'install) (inputs
(replace 'build (list boost-static fmt-for-solidity jsoncpp range-v3 z3))
(lambda* (#:key outputs #:allow-other-keys) (native-inputs
;; Unbundle jsoncpp (list python ncurses findutils))
(delete-file "./cmake/jsoncpp.cmake") (home-page "https://solidity.readthedocs.io")
(substitute* "CMakeLists.txt" (synopsis "Contract-Oriented Programming Language")
(("include\\(jsoncpp\\)") "")) (description
;; Bug list is always sorted since we only build releases "Solidity is a statically-typed curly-braces programming language
(substitute* "./test/cmdlineTests.sh"
(("\"\\$REPO_ROOT\"/scripts/update_bugs_by_version\\.py") ""))
(substitute* "./scripts/build.sh"
(("sudo\\ make\\ install") "make install")
(("cmake\\ ..")
(string-append "cmake .. -DCMAKE_INSTALL_PREFIX="
(assoc-ref outputs "out"))))
(setenv "CIRCLECI" "1")
(invoke "./scripts/build.sh")))
(replace 'check
(lambda _
(invoke "./scripts/tests.sh"))))))
(inputs
(list boost-static jsoncpp z3))
(native-inputs
(list python
ncurses ;for 'tput'
findutils)) ;for 'xargs'
(home-page "https://solidity.readthedocs.io")
(synopsis "Contract-Oriented Programming Language")
(description
"Solidity is a statically-typed curly-braces programming language
designed for developing smart contracts that run on the Ethereum Virtual designed for developing smart contracts that run on the Ethereum Virtual
Machine.") Machine.")
(license license:gpl3+)))) (license license:gpl3+)))