From 7eb64f7603d7f97c03e02375a9f4c15602539812 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau Date: Wed, 16 Sep 2020 13:59:04 -0400 Subject: [PATCH] solc: 0.6.8 -> 0.7.4 Use gccStdenv to avoid issues with clang on Darwin. --- pkgs/development/compilers/solc/default.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/development/compilers/solc/default.nix b/pkgs/development/compilers/solc/default.nix index ac4bc324868..0f0af33e700 100644 --- a/pkgs/development/compilers/solc/default.nix +++ b/pkgs/development/compilers/solc/default.nix @@ -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 = [