1{ lib, buildPythonPackage, fetchPypi, makeWrapper, prettytable, pythonOlder, solc }:
2
3buildPythonPackage rec {
4 pname = "slither-analyzer";
5 version = "0.3.0";
6
7 disabled = pythonOlder "3.6";
8
9 # No Python tests
10 doCheck = false;
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "10vrcqm371kqmf702xmqmzimv3xgrn3k3ip06nr1l6gnj3jk138g";
15 };
16
17 nativeBuildInputs = [ makeWrapper ];
18 propagatedBuildInputs = [ prettytable ];
19
20 postFixup = ''
21 wrapProgram $out/bin/slither \
22 --prefix PATH : "${lib.makeBinPath [ solc ]}"
23 '';
24
25 meta = with lib; {
26 description = "Static Analyzer for Solidity";
27 longDescription = ''
28 Slither is a Solidity static analysis framework written in Python 3. It
29 runs a suite of vulnerability detectors, prints visual information about
30 contract details, and provides an API to easily write custom analyses.
31 '';
32 homepage = https://github.com/trailofbits/slither;
33 license = licenses.agpl3;
34 maintainers = [ maintainers.asymmetric ];
35 };
36}