[PATCH 0/3] gnu: Add solidity.

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Baines
  • Martin Becze
Owner
unassigned
Submitted by
Martin Becze
Severity
normal
M
M
Martin Becze wrote on 4 Nov 2020 13:29
(address . guix-patches@gnu.org)(name . Martin Becze)(address . mjbecze@riseup.net)
20201104122928.30408-1-mjbecze@riseup.net
This adds the Solidity compiler. It also updates Z3 and jsoncpp to versions
needed by Solidity. I tested rebuilding quite a few packages that jsoncpp is a
dependent of but I am not sure how to tests them all.

Martin Becze (3):
gnu: jsoncpp: Update to 1.9.4
gnu: z3: Update to 4.8.9.
gnu: Add solidity.

gnu/local.mk | 2 +-
gnu/packages/maths.scm | 5 +-
.../patches/jsoncpp-fix-inverted-case.patch | 22 -----
gnu/packages/serialization.scm | 6 +-
gnu/packages/solidity.scm | 88 +++++++++++++++++++
5 files changed, 95 insertions(+), 28 deletions(-)
delete mode 100644 gnu/packages/patches/jsoncpp-fix-inverted-case.patch
create mode 100644 gnu/packages/solidity.scm

--
2.29.1
M
M
Martin Becze wrote on 5 Nov 2020 14:59
[PATCH 2/3] gnu: z3: Update to 4.8.9.
(address . 44433@debbugs.gnu.org)(name . Martin Becze)(address . mjbecze@riseup.net)
20201105135945.26384-2-mjbecze@riseup.net
* gnu/packages/maths.scm (z3): Update to 4.8.9.
---
gnu/packages/maths.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ba46937f9a..af1d15000c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -41,6 +41,7 @@
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -4703,7 +4704,7 @@ as equations, scalars, vectors, and matrices.")
(define-public z3
(package
(name "z3")
- (version "4.8.8")
+ (version "4.8.9")
(home-page "https://github.com/Z3Prover/z3")
(source (origin
(method git-fetch)
@@ -4712,7 +4713,7 @@ as equations, scalars, vectors, and matrices.")
(file-name (git-file-name name version))
(sha256
(base32
- "1rn538ghqwxq0v8i6578j8mflk6fyv0cp4hjfqynzvinjbps56da"))))
+ "1hnbzq10d23drd7ksm3c1n2611c3kd0q0yxgz8y78zaafwczvwxx"))))
(build-system gnu-build-system)
(arguments
`(#:imported-modules ((guix build python-build-system)
--
2.29.1
M
M
Martin Becze wrote on 5 Nov 2020 14:59
[PATCH 1/3] gnu: jsoncpp: Update to 1.9.4
(address . 44433@debbugs.gnu.org)(name . Martin Becze)(address . mjbecze@riseup.net)
20201105135945.26384-1-mjbecze@riseup.net
* gnu/packages/serialization.scm (jsoncpp): Update to 1.9.4.
* gnu/packages/patches/jsoncpp-fix-inverted-case.patch: Removed old patch.
* gnu/local.mk (dist_patch_DATA): Remove old patch.
---
gnu/local.mk | 1 -
.../patches/jsoncpp-fix-inverted-case.patch | 22 -------------------
gnu/packages/serialization.scm | 6 ++---
3 files changed, 3 insertions(+), 26 deletions(-)
delete mode 100644 gnu/packages/patches/jsoncpp-fix-inverted-case.patch

Toggle diff (73 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index d4d04c01b8..08a82c45f1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1180,7 +1180,6 @@ dist_patch_DATA = \
%D%/packages/patches/java-xerces-xjavac_taskdef.patch \
%D%/packages/patches/jfsutils-add-sysmacros.patch \
%D%/packages/patches/jfsutils-include-systypes.patch \
- %D%/packages/patches/jsoncpp-fix-inverted-case.patch \
%D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch \
%D%/packages/patches/kdbusaddons-kinit-file-name.patch \
%D%/packages/patches/libvirt-create-machine-cgroup.patch \
diff --git a/gnu/packages/patches/jsoncpp-fix-inverted-case.patch b/gnu/packages/patches/jsoncpp-fix-inverted-case.patch
deleted file mode 100644
index e4897de1b8..0000000000
--- a/gnu/packages/patches/jsoncpp-fix-inverted-case.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-This patch fixes a bug and related test failure on platforms where 'char'
-is unsigned.
-
-Taken from upstream:
-https://github.com/open-source-parsers/jsoncpp/commit/f11611c8785082ead760494cba06196f14a06dcb
-
-diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
-index 8e06cca2..56195dc1 100644
---- a/src/lib_json/json_writer.cpp
-+++ b/src/lib_json/json_writer.cpp
-@@ -178,8 +178,9 @@ static bool isAnyCharRequiredQuoting(char const* s, size_t n) {
-
- char const* const end = s + n;
- for (char const* cur = s; cur < end; ++cur) {
-- if (*cur == '\\' || *cur == '\"' || *cur < ' ' ||
-- static_cast<unsigned char>(*cur) < 0x80)
-+ if (*cur == '\\' || *cur == '\"' ||
-+ static_cast<unsigned char>(*cur) < ' ' ||
-+ static_cast<unsigned char>(*cur) >= 0x80)
- return true;
- }
- return false;
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index fc0102caf0..86f6ac6a1c 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -285,16 +286,15 @@ that implements both the msgpack and msgpack-rpc specifications.")
(define-public jsoncpp
(package
(name "jsoncpp")
- (version "1.9.2")
+ (version "1.9.4")
(home-page "https://github.com/open-source-parsers/jsoncpp")
(source (origin
(method git-fetch)
(uri (git-reference (url home-page) (commit version)))
(file-name (git-file-name name version))
- (patches (search-patches "jsoncpp-fix-inverted-case.patch"))
(sha256
(base32
- "037d1b1qdmn3rksmn1j71j26bv4hkjv7sn7da261k853xb5899sg"))))
+ "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
--
2.29.1
M
M
Martin Becze wrote on 5 Nov 2020 14:59
[PATCH 3/3] gnu: Add solidity.
(address . 44433@debbugs.gnu.org)(name . Martin Becze)(address . mjbecze@riseup.net)
20201105135945.26384-3-mjbecze@riseup.net
* gnu/packages/solidity.scm: (solidity) New variable.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add solidity.scm.
---
gnu/local.mk | 1 +
gnu/packages/solidity.scm | 88 +++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+)
create mode 100644 gnu/packages/solidity.scm

Toggle diff (108 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 08a82c45f1..92be573355 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -508,6 +508,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/slang.scm \
%D%/packages/smalltalk.scm \
%D%/packages/sml.scm \
+ %D%/packages/solidity.scm \
%D%/packages/speech.scm \
%D%/packages/sphinx.scm \
%D%/packages/spice.scm \
diff --git a/gnu/packages/solidity.scm b/gnu/packages/solidity.scm
new file mode 100644
index 0000000000..f67bae8146
--- /dev/null
+++ b/gnu/packages/solidity.scm
@@ -0,0 +1,88 @@
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages solidity)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages boost)
+ #:use-module (gnu packages maths)
+ #:use-module (gnu packages serialization)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages ncurses)
+ #:use-module (guix packages)
+ #: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
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'install)
+ (replace 'build
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-output-to-file "commit_hash.txt"
+ (lambda _
+ (display
+ (substring ,commit 0 8))))
+ ;; 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)))))
+ (native-inputs
+ `(("boost-static" ,boost-static)
+ ("jsoncpp" ,jsoncpp)
+ ("python" ,python)
+ ("tput" ,ncurses)
+ ("xargs" ,findutils)
+ ("z3" ,z3)))
+ (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+))))
--
2.29.1
C
C
Christopher Baines wrote on 16 Nov 2020 23:56
Re: [bug#44433] [PATCH 0/3] gnu: Add solidity.
(name . Martin Becze)(address . mjbecze@riseup.net)(address . 44433@debbugs.gnu.org)
873618nc5h.fsf@cbaines.net
Martin Becze <mjbecze@riseup.net> writes:

Toggle quote (18 lines)
> This adds the Solidity compiler. It also updates Z3 and jsoncpp to versions
> needed by Solidity. I tested rebuilding quite a few packages that jsoncpp is a
> dependent of but I am not sure how to tests them all.
>
> Martin Becze (3):
> gnu: jsoncpp: Update to 1.9.4
> gnu: z3: Update to 4.8.9.
> gnu: Add solidity.
>
> gnu/local.mk | 2 +-
> gnu/packages/maths.scm | 5 +-
> .../patches/jsoncpp-fix-inverted-case.patch | 22 -----
> gnu/packages/serialization.scm | 6 +-
> gnu/packages/solidity.scm | 88 +++++++++++++++++++
> 5 files changed, 95 insertions(+), 28 deletions(-)
> delete mode 100644 gnu/packages/patches/jsoncpp-fix-inverted-case.patch
> create mode 100644 gnu/packages/solidity.scm

Hi Martin,

Thanks for the patches, they look good. I've pushed the z3 update to
master, as that didn't have many dependent packages.

As you've noticed, jsoncpp has quite a few dependencies. The current
process to handle changes like this is to push them to the core-updates
branch. I have tried building jsoncpp on core-updates, but I'm having
problems with git, curl and HTTPS support...

I'll hopefully have some more time to investigate further in a bit,

Thanks again,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl+zA7pfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XecixAAodO/eKH4JZk9jwqX3L6y4tVbhQ9bHk/R
+LxTRj8jZjDttxPsFbZkdPW4iNq7CfMhjL1TBVmtJGhICVivCRuaawvQXfMOu5kK
bH/n9aR6jFPaZgaZAa1i4AG77vgbSWutruBKHvURs823Kup78vjH2QHlGeN8uLwt
pbPXLlvumtqDBi48Teapp5ZbCCVlFpBw2ZsituizK/EMPrdF/Yk2wqXvyyTURjCO
dHFf2JbGWgUgVoZM/gJBEluthtywa0qDNdyaIZedPUZje8lIFZ0oY98ZnhOQ1lO6
m2yS+UXX3FLqXVm2fcxoABO+3npxSHdGe5TIrdsQc3bmaxOvVvN4xO7NaNlhfhcU
1x54VuAJrVrPjL6oDrnFWpEinmkWB2rjG9WprRpuCu3Ag8cBW7cFrVwAKEpSgNt6
GEIDZu2kpmgS05Oaad5iXRqV7qyb6+9WxQ7woExkROA0y5UND3qo730IYjaiBak3
WxmWGnDtaPvOE0eC729E7Osso1xDr4l4YoCJQUBoFYw6fQkWVe5s9mITFHfDRtTb
FOd1l9bgOM9FreKSLfdMpAKoPtGJc5xYfkMd9pHtRrVTGooRocYxX3N9JbGLHmeI
fkMNgDGPadt2dh6Y4fateffxfoAWkkACwNXrZsbXhYJJ040kffRe7NJPk5ardS3p
wXETzDb9GUg=
=gt4W
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 18 Nov 2020 09:17
(name . Martin Becze)(address . mjbecze@riseup.net)(address . 44433-done@debbugs.gnu.org)
87o8jvkrim.fsf@cbaines.net
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (32 lines)
> Martin Becze <mjbecze@riseup.net> writes:
>
>> This adds the Solidity compiler. It also updates Z3 and jsoncpp to versions
>> needed by Solidity. I tested rebuilding quite a few packages that jsoncpp is a
>> dependent of but I am not sure how to tests them all.
>>
>> Martin Becze (3):
>> gnu: jsoncpp: Update to 1.9.4
>> gnu: z3: Update to 4.8.9.
>> gnu: Add solidity.
>>
>> gnu/local.mk | 2 +-
>> gnu/packages/maths.scm | 5 +-
>> .../patches/jsoncpp-fix-inverted-case.patch | 22 -----
>> gnu/packages/serialization.scm | 6 +-
>> gnu/packages/solidity.scm | 88 +++++++++++++++++++
>> 5 files changed, 95 insertions(+), 28 deletions(-)
>> delete mode 100644 gnu/packages/patches/jsoncpp-fix-inverted-case.patch
>> create mode 100644 gnu/packages/solidity.scm
>
> Hi Martin,
>
> Thanks for the patches, they look good. I've pushed the z3 update to
> master, as that didn't have many dependent packages.
>
> As you've noticed, jsoncpp has quite a few dependencies. The current
> process to handle changes like this is to push them to the core-updates
> branch. I have tried building jsoncpp on core-updates, but I'm having
> problems with git, curl and HTTPS support...
>
> I'll hopefully have some more time to investigate further in a bit,

Following up on this, I found out that I broke curl HTTPS support on the
core-updates branch, which I've now fixed [1].


With that fixed, I was able to push these branches in to the
core-updates branch, they'll be merged in to master eventually, although
that may take quite a few weeks.

I'll close this bug, feel free to re-open it if you want to use it to
track solidity being available in the master branch.

Thanks again,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl+02LFfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XdzDw//UClXGVsjhNc75q/mEKrj9s3POHPL1zue
/H5byeWPC1OBoT0mQX2FRgoI8micLgKQ8ZxZsCTB9/yvdr29ioo4vNzTxmnEiC6t
pUV7JWx4KWdYxZET8gGHmGQdLLj9diteYcnVMPbJp0D7oXd2ANMlgtoNtPe/U1kH
/uNxF589fSaK91e7zjDIxFGikRWAGrcPvtYgVYSNlk9ezXiUX1o8W/tFgjnwNW43
NqpivV8dweGNwMTveSorFGrCKhRe04pAfqnjaSqCm+LMqgBKP9KMKuGqyHQcr5rl
PeQ/Wf65bdnlcURObAkhwdg2wKj087GT1yfkOtMnqsanimTqj/JjLStcm6El9Ns0
TQXtiKTM+nuqkxKJV54UPmf+A+qEO4cFSOm3UHMMq0avRUbpXOtgPXAwDhTuQNKe
7OdedUQP4BsI1bb7dkgqWTh6/CuHCR8F1C2Qsh6fb+FEeucO0J+OwD66gBaPD9oC
JHz4H38Lc8UIQvN2VAFtl1vpPHJmFmhhNsd0mFNLuybrNWFc4QHtZ1YOwbsL4Hp0
tnmlRCFxYWJTgJ5i+BXFMKXFJIONrMaNj1obtDMtPr7x0d+iuXTv37DAo6JWcfYg
m3lbvj1C5H/zc4J+tLv3TBF6lFEBG7pnpg9SJa+v7FfD2VI0n/pNfT0G1yR/KIVf
w+SVbMqQFSU=
=V+B1
-----END PGP SIGNATURE-----

Closed
C
C
Christopher Baines wrote on 18 Nov 2020 09:22
Re: [bug#44433] [PATCH 3/3] gnu: Add solidity.
(name . Martin Becze)(address . mjbecze@riseup.net)(address . 44433@debbugs.gnu.org)
87lfezkraz.fsf@cbaines.net
I made a few tweaks to this patch before merging.

Martin Becze <mjbecze@riseup.net> writes:

Toggle quote (2 lines)
> * gnu/packages/solidity.scm: (solidity) New variable.

It is a new variable, but I believe the convention for new files is just
to say that, so I changed this to:

* gnu/packages/solidity.scm: New file.

Toggle quote (82 lines)
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add solidity.scm.
> ---
> gnu/local.mk | 1 +
> gnu/packages/solidity.scm | 88 +++++++++++++++++++++++++++++++++++++++
> 2 files changed, 89 insertions(+)
> create mode 100644 gnu/packages/solidity.scm
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 08a82c45f1..92be573355 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -508,6 +508,7 @@ GNU_SYSTEM_MODULES = \
> %D%/packages/slang.scm \
> %D%/packages/smalltalk.scm \
> %D%/packages/sml.scm \
> + %D%/packages/solidity.scm \
> %D%/packages/speech.scm \
> %D%/packages/sphinx.scm \
> %D%/packages/spice.scm \
> diff --git a/gnu/packages/solidity.scm b/gnu/packages/solidity.scm
> new file mode 100644
> index 0000000000..f67bae8146
> --- /dev/null
> +++ b/gnu/packages/solidity.scm
> @@ -0,0 +1,88 @@
> +;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
> +;;;
> +;;; This file is part of GNU Guix.
> +;;;
> +;;; GNU Guix is free software; you can redistribute it and/or modify it
> +;;; under the terms of the GNU General Public License as published by
> +;;; the Free Software Foundation; either version 3 of the License, or (at
> +;;; your option) any later version.
> +;;;
> +;;; GNU Guix is distributed in the hope that it will be useful, but
> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +;;; GNU General Public License for more details.
> +;;;
> +;;; You should have received a copy of the GNU General Public License
> +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
> +
> +(define-module (gnu packages solidity)
> + #:use-module (gnu packages base)
> + #:use-module (gnu packages boost)
> + #:use-module (gnu packages maths)
> + #:use-module (gnu packages serialization)
> + #:use-module (gnu packages python)
> + #:use-module (gnu packages ncurses)
> + #:use-module (guix packages)
> + #: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
> + `(#:phases
> + (modify-phases %standard-phases
> + (delete 'configure)
> + (delete 'install)
> + (replace 'build
> + (lambda* (#:key outputs #:allow-other-keys)
> + (with-output-to-file "commit_hash.txt"
> + (lambda _
> + (display
> + (substring ,commit 0 8))))

I moved this to a different phase, just because it makes it clearer
what's going on.

Toggle quote (15 lines)
> + ;; 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")

I'd perhaps be tempted to just use/adjust the cmake-build-system to
handle the actual building. Just using cmake/make directly seems to be
documented [1].


I noticed the build.sh script hardcodes the concurrency [2], which got
me thinking this.


Anyway, calling build.sh is also OK.

Toggle quote (13 lines)
> + #t))
> + (replace 'check
> + (lambda _
> + (invoke "./scripts/tests.sh")
> + #t)))))
> + (native-inputs
> + `(("boost-static" ,boost-static)
> + ("jsoncpp" ,jsoncpp)
> + ("python" ,python)
> + ("tput" ,ncurses)
> + ("xargs" ,findutils)
> + ("z3" ,z3)))

So, some of these inputs are still referenced by the package at runtime,
which is a strong signal that they should be inputs, rather than native
inputs. I split it like this:

(inputs
`(("boost-static" ,boost-static)
("jsoncpp" ,jsoncpp)
("z3" ,z3)))
(native-inputs
`(("python" ,python)
("tput" ,ncurses)
("xargs" ,findutils)))

Toggle quote (6 lines)
> + (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+))))
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl+02cRfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XdcKw/9E5wNfcWZCM5CWmyRvJ+Lo5EVaz5hlLoi
ZwkI6TViAzcy/HztK5fBjQMSkGBeYh6Bpr0qYmjB2sugKSB9jf/MjyKmQbRKKKQQ
DVBIO6Xis0/oKeZACYJtbRp3GlpIdUEL/kEVzLHeG9UIz3fF5Ta9y6Lu58JMj+Bv
LGhOfjetD4UtHn+IZzTh+2AlqNTwXcqLiYMl6jQWmo8OEeFs0OaBQ8/mK5N40KUS
RuIWvzX8iditlLp/QzbcTLPv5fLF0T/Df3x7hPyjXlpe7lZVdd55beXu179vuxkl
RHbebjbmxxlSGWDcqXbIdvHKmgZzueSeYds0/0nw5/uWUxqD9IkiMhXA35xAsCwE
i5iBIuLcRLi8N1A3H2sl5d6o2nwXFAqyJTmSU7dMir5j2jizGl092rV/jagoU5A5
0GrC1LhAAhp3ptFj3GqmCjJLryun7PZJwGUW+kxkUQBaqdaICTSyOKs145FLjDsi
olYCe7HJ9sCucxiPRptcE+mtUVJe+kuBidAFrfzwzxgH1SzLpBEdJVsq8p2xceGw
yTEXZvM7g9RqFIBAkDuA9r65rbNaYrlfVDv0UxhxOR98wCYhKuAHGkDu+dU14o/F
nFlAqmMb4KkX9/yJfcnHFMqStTdMXCSZqmSU8TyeclFhH6g8R6moIHE+KeJbYulI
sHAHGmZafFY=
=ap49
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

To comment on this conversation send an email to 44433@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 44433
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch