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