diff options
author | Robert Schütz <nix@dotlambda.de> | 2024-03-10 16:59:26 -0700 |
---|---|---|
committer | Robert Schütz <nix@dotlambda.de> | 2024-03-10 17:02:12 -0700 |
commit | 48298c2fc6a9c9dde73edce1278b1144c4ea9c71 (patch) | |
tree | 4fe81dde97a9bccfb77f952b3507496f4c1a6a25 | |
parent | 672879b3c0348bce98e19c661e5a3a8ca09158a3 (diff) | |
download | nixlib-48298c2fc6a9c9dde73edce1278b1144c4ea9c71.tar nixlib-48298c2fc6a9c9dde73edce1278b1144c4ea9c71.tar.gz nixlib-48298c2fc6a9c9dde73edce1278b1144c4ea9c71.tar.bz2 nixlib-48298c2fc6a9c9dde73edce1278b1144c4ea9c71.tar.lz nixlib-48298c2fc6a9c9dde73edce1278b1144c4ea9c71.tar.xz nixlib-48298c2fc6a9c9dde73edce1278b1144c4ea9c71.tar.zst nixlib-48298c2fc6a9c9dde73edce1278b1144c4ea9c71.zip |
python311Packages.slither-analyzer: add pythonImportsCheck and passthru.tests
-rw-r--r-- | pkgs/development/python-modules/slither-analyzer/default.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/slither-analyzer/default.nix b/pkgs/development/python-modules/slither-analyzer/default.nix index 42d65ebdbe00..bccc5b97f728 100644 --- a/pkgs/development/python-modules/slither-analyzer/default.nix +++ b/pkgs/development/python-modules/slither-analyzer/default.nix @@ -11,6 +11,8 @@ , solc , web3 , withSolc ? false +, testers +, slither-analyzer }: buildPythonPackage rec { @@ -44,9 +46,38 @@ buildPythonPackage rec { --prefix PATH : "${lib.makeBinPath [ solc ]}" ''; + # required for pythonImportsCheck + postInstall = '' + export HOME="$TEMP" + ''; + + pythonImportsCheck = [ + "slither" + "slither.all_exceptions" + "slither.analyses" + "slither.core" + "slither.detectors" + "slither.exceptions" + "slither.formatters" + "slither.printers" + "slither.slither" + "slither.slithir" + "slither.solc_parsing" + "slither.utils" + "slither.visitors" + "slither.vyper_parsing" + ]; + # No Python tests doCheck = false; + passthru.tests = { + version = testers.testVersion { + package = slither-analyzer; + command = "HOME=$TMPDIR slither --version"; + }; + }; + meta = with lib; { description = "Static Analyzer for Solidity"; longDescription = '' @@ -57,6 +88,7 @@ buildPythonPackage rec { homepage = "https://github.com/trailofbits/slither"; changelog = "https://github.com/crytic/slither/releases/tag/${version}"; license = licenses.agpl3Plus; + mainProgram = "slither"; maintainers = with maintainers; [ arturcygan fab hellwolf ]; }; } |