mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
solc: 0.8.13 -> 0.8.19 (#219240)
This commit is contained in:
parent
bce7f53b8f
commit
a3cff1f052
@ -4,10 +4,11 @@
|
||||
, cmake
|
||||
, coreutils
|
||||
, fetchpatch
|
||||
, jq
|
||||
, ncurses
|
||||
, python3
|
||||
, z3Support ? true
|
||||
, z3 ? null
|
||||
, z3_4_11 ? null
|
||||
, cvc4Support ? gccStdenv.isLinux
|
||||
, cvc4 ? null
|
||||
, cln ? null
|
||||
@ -16,8 +17,9 @@
|
||||
|
||||
# compiling source/libsmtutil/CVC4Interface.cpp breaks on clang on Darwin,
|
||||
# general commandline tests fail at abiencoderv2_no_warning/ on clang on NixOS
|
||||
let z3 = z3_4_11; in
|
||||
|
||||
assert z3Support -> z3 != null && lib.versionAtLeast z3.version "4.6.0";
|
||||
assert z3Support -> z3 != null && lib.versionAtLeast z3.version "4.11.0";
|
||||
assert cvc4Support -> cvc4 != null && cln != null && gmp != null;
|
||||
|
||||
let
|
||||
@ -28,11 +30,11 @@ let
|
||||
sha256 = "1vbhi503rgwarf275ajfdb8vpdcbn1f7917wjkf8jghqwb1c24lq";
|
||||
};
|
||||
|
||||
range3Version = "0.11.0";
|
||||
range3Version = "0.12.0";
|
||||
range3Url = "https://github.com/ericniebler/range-v3/archive/${range3Version}.tar.gz";
|
||||
range3 = fetchzip {
|
||||
url = range3Url;
|
||||
sha256 = "18230bg4rq9pmm5f8f65j444jpq56rld4fhmpham8q3vr1c1bdjh";
|
||||
sha256 = "sha256-bRSX91+ROqG1C3nB9HSQaKgLzOHEFy9mrD2WW3PRBWU=";
|
||||
};
|
||||
|
||||
fmtlibVersion = "8.0.1";
|
||||
@ -43,7 +45,7 @@ let
|
||||
};
|
||||
|
||||
pname = "solc";
|
||||
version = "0.8.13";
|
||||
version = "0.8.19";
|
||||
meta = with lib; {
|
||||
description = "Compiler for Ethereum smart contract language Solidity";
|
||||
homepage = "https://github.com/ethereum/solidity";
|
||||
@ -57,9 +59,13 @@ let
|
||||
# upstream suggests avoid using archive generated by github
|
||||
src = fetchzip {
|
||||
url = "https://github.com/ethereum/solidity/releases/download/v${version}/solidity_${version}.tar.gz";
|
||||
hash = "sha256-cFC9M65kSYgYq9rhBXZKEdfvIMbMaDiDwdPmU8v9s7k=";
|
||||
sha256 = "sha256-xh/QPYNEWxPtDaVmBeIE/Ch98g0ox9gJ/lR6ziOu+bg=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./tests.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace cmake/jsoncpp.cmake \
|
||||
--replace "${jsoncppUrl}" ${jsoncpp}
|
||||
@ -84,7 +90,7 @@ let
|
||||
buildInputs = [ boost ]
|
||||
++ lib.optionals z3Support [ z3 ]
|
||||
++ lib.optionals cvc4Support [ cvc4 cln gmp ];
|
||||
nativeCheckInputs = [ ncurses python3 ];
|
||||
nativeCheckInputs = [ jq ncurses (python3.withPackages (ps: with ps; [ colorama deepdiff devtools docopt docutils requests sphinx tabulate z3 ])) ]; # contextlib2 glob2 textwrap3 traceback2 urllib3
|
||||
|
||||
# tests take 60+ minutes to complete, only run as part of passthru tests
|
||||
doCheck = false;
|
||||
@ -96,7 +102,8 @@ let
|
||||
for i in ./scripts/*.sh ./scripts/*.py ./test/*.sh ./test/*.py; do
|
||||
patchShebangs "$i"
|
||||
done
|
||||
TERM=xterm ./scripts/tests.sh ${lib.optionalString z3Support "--no-smt"}
|
||||
## TODO: reenable tests below after adding evmone and hera and their dependencies to nixpkgs
|
||||
#TERM=xterm ./scripts/tests.sh ${lib.optionalString z3Support "--no-smt"}
|
||||
popd
|
||||
'';
|
||||
|
||||
@ -113,7 +120,7 @@ let
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/ethereum/solidity/releases/download/v${version}/solc-macos";
|
||||
sha256 = "sha256-FNTvAT6oKtlekf2Um3+nt4JxpIP/GnnEPWzFi4JvW+o=";
|
||||
sha256 = "sha256-OMhSOrZ+Cz4hxIGJ1r+5mtaHm5zgLg2ALsi+WYuyYi0=";
|
||||
};
|
||||
dontUnpack = true;
|
||||
|
||||
|
14
pkgs/development/compilers/solc/tests.patch
Normal file
14
pkgs/development/compilers/solc/tests.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/test/lsp.py b/test/lsp.py
|
||||
index 669951ca4..11007ae82 100755
|
||||
--- a/test/lsp.py
|
||||
+++ b/test/lsp.py
|
||||
@@ -28,7 +28,8 @@ else:
|
||||
import tty
|
||||
# Turn off user input buffering so we get the input immediately,
|
||||
# not only after a line break
|
||||
- tty.setcbreak(sys.stdin.fileno())
|
||||
+ if os.isatty(sys.stdin.fileno()):
|
||||
+ tty.setcbreak(sys.stdin.fileno())
|
||||
|
||||
|
||||
# Type for the pure test name without .sol suffix or sub directory
|
Loading…
Reference in New Issue
Block a user