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:
parent
b49c2e558d
commit
84d413d2fd
1 changed files with 37 additions and 57 deletions
|
@ -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.7.4")
|
(version "0.8.15")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method url-fetch)
|
||||||
(uri
|
(uri
|
||||||
(git-reference
|
(string-append "https://github.com/ethereum/solidity/releases/download/v"
|
||||||
(url "https://github.com/ethereum/solidity")
|
version "/solidity_" version ".tar.gz"))
|
||||||
(commit commit)))
|
|
||||||
(file-name (git-file-name name version))
|
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1mswhjymiwnd3n7h3sjvjx5x8223yih0yvfcr0zpqr4aizpfx5z8"))))
|
(base32 "0j9a8y5fizarl9yhbnwvd0x1nm6qsbskqb7j1fwsyqx47w5sa82p"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:phases
|
(list
|
||||||
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'create-commit_hash.txt
|
(add-after 'unpack 'unbundle-3rd-party-dependencies
|
||||||
(lambda _
|
(lambda _
|
||||||
(with-output-to-file "commit_hash.txt"
|
|
||||||
(lambda _
|
|
||||||
(display
|
|
||||||
(substring #$commit 0 8))))))
|
|
||||||
(delete 'configure)
|
|
||||||
(delete 'install)
|
|
||||||
(replace 'build
|
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
|
||||||
;; Unbundle jsoncpp
|
|
||||||
(delete-file "./cmake/jsoncpp.cmake")
|
|
||||||
(substitute* "CMakeLists.txt"
|
(substitute* "CMakeLists.txt"
|
||||||
(("include\\(jsoncpp\\)") ""))
|
(("include\\(fmtlib\\)")
|
||||||
;; Bug list is always sorted since we only build releases
|
"find_package(fmt)")
|
||||||
(substitute* "./test/cmdlineTests.sh"
|
(("include\\(range-v3\\)")
|
||||||
(("\"\\$REPO_ROOT\"/scripts/update_bugs_by_version\\.py") ""))
|
"find_package(range-v3)")
|
||||||
(substitute* "./scripts/build.sh"
|
(("include\\(jsoncpp\\)")
|
||||||
(("sudo\\ make\\ install") "make install")
|
"find_package(jsoncpp)")))))))
|
||||||
(("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
|
(inputs
|
||||||
(list boost-static jsoncpp z3))
|
(list boost-static fmt-for-solidity jsoncpp range-v3 z3))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list python
|
(list python ncurses findutils))
|
||||||
ncurses ;for 'tput'
|
|
||||||
findutils)) ;for 'xargs'
|
|
||||||
(home-page "https://solidity.readthedocs.io")
|
(home-page "https://solidity.readthedocs.io")
|
||||||
(synopsis "Contract-Oriented Programming Language")
|
(synopsis "Contract-Oriented Programming Language")
|
||||||
(description
|
(description
|
||||||
"Solidity is a statically-typed curly-braces programming language
|
"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+)))
|
||||||
|
|
Reference in a new issue