diff options
Diffstat (limited to 'pkgs/development/python-modules/slither-analyzer/default.nix')
-rw-r--r-- | pkgs/development/python-modules/slither-analyzer/default.nix | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/slither-analyzer/default.nix b/pkgs/development/python-modules/slither-analyzer/default.nix index bccc5b97f7283..2dc276bac48b0 100644 --- a/pkgs/development/python-modules/slither-analyzer/default.nix +++ b/pkgs/development/python-modules/slither-analyzer/default.nix @@ -7,7 +7,7 @@ , packaging , prettytable , pythonOlder -, setuptools +, setuptools-scm , solc , web3 , withSolc ? false @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "slither-analyzer"; - version = "0.10.1"; + version = "0.10.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -26,12 +26,12 @@ buildPythonPackage rec { owner = "crytic"; repo = "slither"; rev = "refs/tags/${version}"; - hash = "sha256-MjO2ZYFat+byH0DEt2v/wPXaYL2lmlESgQCZXD4Jpt0="; + hash = "sha256-KmbmljtmMtrJxgSMJjQ8fdk6RpEXcAVBuo24EsyMV8k="; }; nativeBuildInputs = [ makeWrapper - setuptools + setuptools-scm ]; propagatedBuildInputs = [ @@ -68,14 +68,19 @@ buildPythonPackage rec { "slither.vyper_parsing" ]; - # No Python tests - doCheck = false; + # Test if the binary works during the build phase. + checkPhase = '' + runHook preCheck - passthru.tests = { - version = testers.testVersion { - package = slither-analyzer; - command = "HOME=$TMPDIR slither --version"; - }; + HOME="$TEMP" $out/bin/slither --version + + runHook postCheck + ''; + + passthru.tests.version = testers.testVersion { + package = slither-analyzer; + command = "HOME=$TMPDIR slither --version"; + version = "${version}"; }; meta = with lib; { |