From patchwork Sun Jul 3 09:43:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Zihao X-Patchwork-Id: 40482 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3D9BC27BBE9; Sun, 3 Jul 2022 10:54:30 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CE4D127BBEA for ; Sun, 3 Jul 2022 10:54:26 +0100 (BST) Received: from localhost ([::1]:39506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7wJ8-0005w5-1G for patchwork@mira.cbaines.net; Sun, 03 Jul 2022 05:54:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7wB0-0007R6-79 for guix-patches@gnu.org; Sun, 03 Jul 2022 05:46:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7wAz-0005ct-Tb for guix-patches@gnu.org; Sun, 03 Jul 2022 05:46:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o7wAz-0008LA-S0 for guix-patches@gnu.org; Sun, 03 Jul 2022 05:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56107] [PATCH]: Update z3 to 4.8.17 and use cmake to build the package. Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 Jul 2022 09:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56107 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 56107@debbugs.gnu.org, Maxime Devos Received: via spool by 56107-submit@debbugs.gnu.org id=B56107.165684150928756 (code B ref 56107); Sun, 03 Jul 2022 09:46:01 +0000 Received: (at 56107) by debbugs.gnu.org; 3 Jul 2022 09:45:09 +0000 Received: from localhost ([127.0.0.1]:43295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o7w9z-0007MA-1H for submit@debbugs.gnu.org; Sun, 03 Jul 2022 05:45:09 -0400 Received: from mail-m975.mail.163.com ([123.126.97.5]:22006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o7w9s-0007Lm-SE for 56107@debbugs.gnu.org; Sun, 03 Jul 2022 05:44:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=SVW9J UVtfSt61rqEftaSbZRVTsbURHzDcBhzdap1byc=; b=C3w8htuuCgKmduCZcPyEs fSsfTvCk80/b4THgU1CcRKUQ2/fdw6NdFDHUfdLWwRAWW2afdwjmX5gkOsSA23Ie HYbRvm12JC5XlTNXOpKPeAde5Ptyiz3yzD4dM0e0qqnDSgndqw2iIb0bhmOSLaT2 QNoAMoARnRy7SG8uFQYBUU= Received: from asus-laptop (unknown [27.38.172.243]) by smtp5 (Coremail) with SMTP id HdxpCgDnZf0JZcFiOK3WMA--.45477S2; Sun, 03 Jul 2022 17:44:42 +0800 (CST) References: <86mte7v7jf.fsf@163.com> <81f29e686f5727d02c9924782d4adb9895369046.camel@telenet.be> <86fsjyv3bc.fsf@163.com> <87k08v13tg.fsf_-_@gnu.org> User-agent: mu4e 1.6.11; emacs 28.1 From: Zhu Zihao Date: Sun, 03 Jul 2022 17:43:35 +0800 In-reply-to: <87k08v13tg.fsf_-_@gnu.org> Message-ID: <86fsji7con.fsf@163.com> MIME-Version: 1.0 X-CM-TRANSID: HdxpCgDnZf0JZcFiOK3WMA--.45477S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvj4RM_M-DUUUU X-Originating-IP: [27.38.172.243] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBLw4zr2Hmne5pIAAAsA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches I update the solidity to 0.8.15 and now it can be built with z3 4.8. From dca38a7c446f38417ae914d2f71c0568fba2cb8a Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Sun, 3 Jul 2022 17:39:27 +0800 Subject: [PATCH 6/6] 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. --- gnu/packages/solidity.scm | 94 +++++++++++++++------------------------ 1 file changed, 37 insertions(+), 57 deletions(-) diff --git a/gnu/packages/solidity.scm b/gnu/packages/solidity.scm index 606e078e42..8e0bd91205 100644 --- a/gnu/packages/solidity.scm +++ b/gnu/packages/solidity.scm @@ -19,73 +19,53 @@ (define-module (gnu packages solidity) #:use-module (gnu packages base) #:use-module (gnu packages boost) + #:use-module (gnu packages cpp) #:use-module (gnu packages maths) #:use-module (gnu packages serialization) + #:use-module (gnu packages pretty-print) #:use-module (gnu packages python) #:use-module (gnu packages ncurses) #:use-module (guix packages) #:use-module (guix gexp) + #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module ((guix licenses) #:prefix license:)) (define-public solidity - (let ((commit "3f05b770bdbf60eca866382049ea191dd701409a")) - (package - (name "solidity") - (version "0.7.4") - (source - (origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/ethereum/solidity") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1mswhjymiwnd3n7h3sjvjx5x8223yih0yvfcr0zpqr4aizpfx5z8")))) - (build-system cmake-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'create-commit_hash.txt - (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" - (("include\\(jsoncpp\\)") "")) - ;; Bug list is always sorted since we only build releases - (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") - #t)) - (replace 'check - (lambda _ - (invoke "./scripts/tests.sh") - #t))))) - (inputs - (list boost-static jsoncpp z3)) - (native-inputs - (list python ncurses findutils)) - (home-page "https://solidity.readthedocs.io") - (synopsis "Contract-Oriented Programming Language") - (description - "Solidity is a statically-typed curly-braces programming language + (package + (name "solidity") + (version "0.8.15") + (source + (origin + (method url-fetch) + (uri + (string-append "https://github.com/ethereum/solidity/releases/download/v" + version "/solidity_" version ".tar.gz")) + (sha256 + (base32 "0j9a8y5fizarl9yhbnwvd0x1nm6qsbskqb7j1fwsyqx47w5sa82p")))) + (build-system cmake-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'unbundle-3rd-party-dependencies + (lambda _ + (substitute* "CMakeLists.txt" + (("include\\(fmtlib\\)") + "find_package(fmt)") + (("include\\(range-v3\\)") + "find_package(range-v3)") + (("include\\(jsoncpp\\)") + "find_package(jsoncpp)"))))))) + (inputs + (list boost-static fmt-for-solidity jsoncpp range-v3 z3)) + (native-inputs + (list python ncurses findutils)) + (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 Machine.") - (license license:gpl3+)))) + (license license:gpl3+))) -- 2.36.1