Merge pull request #108610 from arcz/slither

This commit is contained in:
Sandro 2021-02-05 23:16:33 +01:00 committed by GitHub
commit e5b478271e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View File

@ -6,6 +6,10 @@ buildPythonPackage rec {
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
patchPhase = ''
substituteInPlace setup.py --replace 'version="0.1.11",' 'version="${version}",'
'';
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "crytic"; owner = "crytic";
repo = "crytic-compile"; repo = "crytic-compile";
@ -21,7 +25,7 @@ buildPythonPackage rec {
meta = with lib; { meta = with lib; {
description = "Abstraction layer for smart contract build systems"; description = "Abstraction layer for smart contract build systems";
homepage = "https://github.com/crytic/crytic-compile"; homepage = "https://github.com/crytic/crytic-compile";
license = licenses.agpl3; license = licenses.agpl3Plus;
maintainers = with maintainers; [ SuperSandro2000 ]; maintainers = with maintainers; [ SuperSandro2000 arturcygan ];
}; };
} }

View File

@ -1,5 +1,7 @@
{ lib, buildPythonPackage, fetchPypi, makeWrapper, pythonOlder { lib, stdenv, buildPythonPackage, fetchPypi, makeWrapper, pythonOlder
, crytic-compile, prettytable, setuptools, solc , crytic-compile, prettytable, setuptools
# solc is currently broken on Darwin, default to false
, solc, withSolc ? !stdenv.isDarwin
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -19,7 +21,7 @@ buildPythonPackage rec {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
propagatedBuildInputs = [ crytic-compile prettytable setuptools ]; propagatedBuildInputs = [ crytic-compile prettytable setuptools ];
postFixup = '' postFixup = lib.optionalString withSolc ''
wrapProgram $out/bin/slither \ wrapProgram $out/bin/slither \
--prefix PATH : "${lib.makeBinPath [ solc ]}" --prefix PATH : "${lib.makeBinPath [ solc ]}"
''; '';
@ -32,7 +34,7 @@ buildPythonPackage rec {
contract details, and provides an API to easily write custom analyses. contract details, and provides an API to easily write custom analyses.
''; '';
homepage = "https://github.com/trailofbits/slither"; homepage = "https://github.com/trailofbits/slither";
license = licenses.agpl3; license = licenses.agpl3Plus;
maintainers = [ maintainers.asymmetric ]; maintainers = with maintainers; [ asymmetric arturcygan ];
}; };
} }