From 994d3aeb30fe4d91da1f92543fae4b3f3b33948b Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Thu, 6 Jul 2023 18:22:37 +0300 Subject: [PATCH 1/6] python311Packages.crytic-compile: add new maintainer hellwolf --- pkgs/development/python-modules/crytic-compile/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/crytic-compile/default.nix b/pkgs/development/python-modules/crytic-compile/default.nix index 5133f1642e13..8d1addc9b9a5 100644 --- a/pkgs/development/python-modules/crytic-compile/default.nix +++ b/pkgs/development/python-modules/crytic-compile/default.nix @@ -39,6 +39,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; [ SuperSandro2000 arturcygan hellwolf ]; }; } From 759d063ee616fbf59b071a0e4e0d166e6c2a0fb9 Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Fri, 5 May 2023 11:53:14 +0300 Subject: [PATCH 2/6] python311Packages.crytic-compile: 0.3.0 -> 0.3.3 --- .../python-modules/crytic-compile/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/crytic-compile/default.nix b/pkgs/development/python-modules/crytic-compile/default.nix index 8d1addc9b9a5..65abcedd8356 100644 --- a/pkgs/development/python-modules/crytic-compile/default.nix +++ b/pkgs/development/python-modules/crytic-compile/default.nix @@ -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,20 +19,24 @@ 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" + "crytic_compile" ]; meta = with lib; { From 6c35238e62ddeb763a783325a2e6969577726205 Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Thu, 6 Jul 2023 18:22:22 +0300 Subject: [PATCH 3/6] python311Packages.slither-analyzer: add new maintainer hellwolf --- pkgs/development/python-modules/slither-analyzer/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/slither-analyzer/default.nix b/pkgs/development/python-modules/slither-analyzer/default.nix index ef2a897de21e..e5625293c0d9 100644 --- a/pkgs/development/python-modules/slither-analyzer/default.nix +++ b/pkgs/development/python-modules/slither-analyzer/default.nix @@ -55,6 +55,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 ]; }; } From 885af0dcdbdf1ab79648f18b7fc89e48790a3297 Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Fri, 5 May 2023 11:53:44 +0300 Subject: [PATCH 4/6] python311Packages.slither-analyzer: 0.9.2 -> 0.9.6 --- .../development/python-modules/slither-analyzer/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/slither-analyzer/default.nix b/pkgs/development/python-modules/slither-analyzer/default.nix index e5625293c0d9..be0e061bdc68 100644 --- a/pkgs/development/python-modules/slither-analyzer/default.nix +++ b/pkgs/development/python-modules/slither-analyzer/default.nix @@ -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 '' From 3fcbabcc2989cac8e026b2d4c3a9bcbcdc831578 Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Tue, 6 Jun 2023 09:46:46 +0300 Subject: [PATCH 5/6] echidna: add new maintainer hellwolf --- pkgs/tools/security/echidna/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/security/echidna/default.nix b/pkgs/tools/security/echidna/default.nix index fcd94f66fbc5..5653348210c0 100644 --- a/pkgs/tools/security/echidna/default.nix +++ b/pkgs/tools/security/echidna/default.nix @@ -46,7 +46,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"; } From d20ff6f764230148a2ce950b1e842e9634261bc5 Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Sat, 6 May 2023 13:14:53 +0300 Subject: [PATCH 6/6] echidna: 2.0.5 -> 2.2.1 * Changes - add slither-analyzer as a explicit executable system dependency. - use custom hevm dependency, instead of from haskellPackage. --- .../python-modules/crytic-compile/default.nix | 4 +- pkgs/tools/security/echidna/default.nix | 60 +++++++++++++------ 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/crytic-compile/default.nix b/pkgs/development/python-modules/crytic-compile/default.nix index 65abcedd8356..07e5c19f8d2b 100644 --- a/pkgs/development/python-modules/crytic-compile/default.nix +++ b/pkgs/development/python-modules/crytic-compile/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { # PermissionError: [Errno 13] Permission denied: '/homeless-shelter' env.HOME = "/tmp"; pythonImportsCheck = [ - "crytic_compile" + "crytic_compile" ]; meta = with lib; { @@ -44,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 hellwolf ]; + maintainers = with maintainers; [ arturcygan hellwolf ]; }; } diff --git a/pkgs/tools/security/echidna/default.nix b/pkgs/tools/security/echidna/default.nix index 5653348210c0..bf28f8936166 100644 --- a/pkgs/tools/security/echidna/default.nix +++ b/pkgs/tools/security/echidna/default.nix @@ -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