Merge pull request #230067 from hellwolf/update-slither-analyzier

Update slither-analyzier & crytic-compiler & echidna
This commit is contained in:
Lassulus
2023-07-21 09:12:26 +02:00
committed by GitHub
3 changed files with 55 additions and 26 deletions
@@ -5,11 +5,12 @@
, pycryptodome
, pythonOlder
, setuptools
, solc-select
}:
buildPythonPackage rec {
pname = "crytic-compile";
version = "0.3.0";
version = "0.3.3";
format = "setuptools";
disabled = pythonOlder "3.6";
@@ -18,18 +19,22 @@ buildPythonPackage rec {
owner = "crytic";
repo = "crytic-compile";
rev = "refs/tags/${version}";
hash = "sha256-4iTvtu2TmxvLTyWm4PV0+yV1fRLYpJHZNBgjy1MFLjM=";
hash = "sha256-Nx3eKy/0BLg82o3qDHjxcHXtpX3KDdnBKYwCuTLWRUE=";
};
propagatedBuildInputs = [
cbor2
pycryptodome
setuptools
solc-select
];
# Test require network access
doCheck = false;
# required for import check to work
# PermissionError: [Errno 13] Permission denied: '/homeless-shelter'
env.HOME = "/tmp";
pythonImportsCheck = [
"crytic_compile"
];
@@ -39,6 +44,6 @@ buildPythonPackage rec {
homepage = "https://github.com/crytic/crytic-compile";
changelog = "https://github.com/crytic/crytic-compile/releases/tag/${version}";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ SuperSandro2000 arturcygan ];
maintainers = with maintainers; [ arturcygan hellwolf ];
};
}
@@ -9,12 +9,13 @@
, pythonOlder
, setuptools
, solc
, web3
, withSolc ? false
}:
buildPythonPackage rec {
pname = "slither-analyzer";
version = "0.9.2";
version = "0.9.6";
format = "setuptools";
disabled = pythonOlder "3.8";
@@ -23,7 +24,7 @@ buildPythonPackage rec {
owner = "crytic";
repo = "slither";
rev = "refs/tags/${version}";
hash = "sha256-Co3BFdLmSIMqlZVEPJHYH/Cf7oKYSZ+Ktbnd5RZGmfE=";
hash = "sha256-c6H7t+aPPWn1i/30G9DLOmwHhdHHHbcP3FRVVjk1XR4=";
};
nativeBuildInputs = [
@@ -35,6 +36,7 @@ buildPythonPackage rec {
packaging
prettytable
setuptools
web3
];
postFixup = lib.optionalString withSolc ''
@@ -55,6 +57,6 @@ buildPythonPackage rec {
homepage = "https://github.com/trailofbits/slither";
changelog = "https://github.com/crytic/slither/releases/tag/${version}";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ arturcygan fab ];
maintainers = with maintainers; [ arturcygan fab hellwolf ];
};
}
+42 -20
View File
@@ -1,38 +1,60 @@
{ lib
, mkDerivation
, fetchFromGitHub
# Haskell deps
, mkDerivation, aeson, base, base16-bytestring, binary, brick, bytestring
, containers, data-dword, data-has, directory, exceptions, extra, filepath
, hashable, hevm, hpack, html-entities, lens, ListLike, MonadRandom, mtl
, optparse-applicative, process, random, semver, tasty, tasty-hunit
, tasty-quickcheck, text, transformers, unix, unliftio, unordered-containers
, vector, vector-instances, vty, yaml
, haskellPackages
, haskell
, slither-analyzer
}:
mkDerivation rec {
let haskellPackagesOverride = haskellPackages.override {
overrides = self: super: {
# following the revision specified in echidna/stack.yaml
# TODO: 0.51.3 is not in haskellPackages yet
hevm = haskell.lib.overrideCabal super.hevm (oa: {
version = "0.51.3";
src = fetchFromGitHub {
owner = "ethereum";
repo = "hevm";
rev = "release/0.51.3";
hash = "sha256-H6oURBGoQWSOuPhBB+UKg2UarVzXgv1tmfDBLnOtdhU=";
};
libraryHaskellDepends = oa.libraryHaskellDepends
++ (with haskellPackages;[githash witch]);
});
};
};
in mkDerivation rec {
pname = "echidna";
version = "2.0.5";
version = "2.2.1";
src = fetchFromGitHub {
owner = "crytic";
repo = "echidna";
rev = "v${version}";
sha256 = "sha256-8bChe+qA4DowfuwsR5wLckb56fXi102g8vL2gAH/kYE=";
sha256 = "sha256-5d9ttPR3rRHywBeLM85EGCEZLNZNZzOAhIN6AJToJyI=";
};
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson base base16-bytestring binary brick bytestring containers data-dword
data-has directory exceptions extra filepath hashable hevm html-entities
lens ListLike MonadRandom mtl optparse-applicative process random semver
text transformers unix unliftio unordered-containers vector vector-instances
vty yaml
libraryToolDepends = with haskellPackagesOverride; [
haskellPackages.hpack
];
libraryToolDepends = [ hpack ];
executableHaskellDepends = libraryHaskellDepends;
testHaskellDepends = [
# Note: This can be extracted from package.yaml of echidna, the list is shorter because some are transitive.
executableHaskellDepends = with haskellPackagesOverride;
[aeson base base16-bytestring binary brick bytestring code-page containers data-dword data-has directory exceptions extra
filepath hashable hevm html-conduit html-entities http-conduit lens ListLike MonadRandom mtl optics optparse-applicative
process random semver text transformers unix unliftio unordered-containers vector vector-instances vty with-utf8
xml-conduit yaml];
# Note: there is also a runtime dependency of slither-analyzer, let's include it also.
executableSystemDepends = [ slither-analyzer ];
testHaskellDepends = with haskellPackagesOverride; [
tasty tasty-hunit tasty-quickcheck
];
preConfigure = ''
hpack
# re-enable dynamic build for Linux
@@ -46,7 +68,7 @@ mkDerivation rec {
description = "Ethereum smart contract fuzzer";
homepage = "https://github.com/crytic/echidna";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ arturcygan ];
maintainers = with lib.maintainers; [ arturcygan hellwolf ];
platforms = lib.platforms.unix;
mainProgram = "echidna-test";
}