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