solc: 0.6.8 -> 0.7.4

Use gccStdenv to avoid issues with clang on Darwin.
This commit is contained in:
Francois-Rene Rideau 2020-09-16 13:59:04 -04:00 committed by Jonathan Ringer
parent 11d53d30f6
commit 7eb64f7603

View file

@ -1,32 +1,37 @@
{ stdenv, fetchzip, boost, cmake, ncurses, python3, coreutils
{ gccStdenv, fetchzip, boost, cmake, ncurses, python3, coreutils
, z3Support ? true, z3 ? null, cvc4Support ? true, cvc4 ? null
, cln ? null, gmp ? null
}:
# compiling source/libsmtutil/CVC4Interface.cpp breaks on clang on Darwin,
# general commandline tests fail at abiencoderv2_no_warning/ on clang on NixOS
let stdenv = gccStdenv; in
assert z3Support -> z3 != null && stdenv.lib.versionAtLeast z3.version "4.6.0";
assert cvc4Support -> cvc4 != null && cln != null && gmp != null;
let
jsoncppURL = "https://github.com/open-source-parsers/jsoncpp/archive/1.9.2.tar.gz";
jsoncppVersion = "1.9.4";
jsoncppUrl = "https://github.com/open-source-parsers/jsoncpp/archive/${jsoncppVersion}.tar.gz";
jsoncpp = fetchzip {
url = jsoncppURL;
sha256 = "037d1b1qdmn3rksmn1j71j26bv4hkjv7sn7da261k853xb5899sg";
url = jsoncppUrl;
sha256 = "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv";
};
in
stdenv.mkDerivation rec {
pname = "solc";
version = "0.6.8";
version = "0.7.4";
# upstream suggests avoid using archive generated by github
src = fetchzip {
url = "https://github.com/ethereum/solidity/releases/download/v${version}/solidity_${version}.tar.gz";
sha256 = "1nxds6c10hjqjjk893qw2yljws57li0xigbf3ih85y8y6d587ph0";
sha256 = "02261l54jdbvxk612z7zsyvmchy1rx4lf27b3f616sd7r56krpkg";
};
postPatch = ''
substituteInPlace cmake/jsoncpp.cmake \
--replace "${jsoncppURL}" ${jsoncpp}
--replace "${jsoncppUrl}" ${jsoncpp}
'';
cmakeFlags = [