diff options
author | Robert Schütz <nix@dotlambda.de> | 2024-03-13 23:20:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-13 23:20:31 +0000 |
commit | 6a7946326b96cb8ec36d2c94f0897e0b2149e9e5 (patch) | |
tree | d2bfb1fc16377391e74a9e923ac1a81984e8e7b5 | |
parent | 76878843253e33c22aadd1ea3ffc806d266889d4 (diff) | |
parent | 48298c2fc6a9c9dde73edce1278b1144c4ea9c71 (diff) | |
download | nixlib-6a7946326b96cb8ec36d2c94f0897e0b2149e9e5.tar nixlib-6a7946326b96cb8ec36d2c94f0897e0b2149e9e5.tar.gz nixlib-6a7946326b96cb8ec36d2c94f0897e0b2149e9e5.tar.bz2 nixlib-6a7946326b96cb8ec36d2c94f0897e0b2149e9e5.tar.lz nixlib-6a7946326b96cb8ec36d2c94f0897e0b2149e9e5.tar.xz nixlib-6a7946326b96cb8ec36d2c94f0897e0b2149e9e5.tar.zst nixlib-6a7946326b96cb8ec36d2c94f0897e0b2149e9e5.zip |
Merge pull request #294867 from dotlambda/slither-analyzer-tests
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 ]; }; } |