Skip to content

Commit 721568c

Browse files
committed
base myhril package, py-ecc-410 and eth-utils-110
1 parent bd93a64 commit 721568c

File tree

3 files changed

+82
-6
lines changed

3 files changed

+82
-6
lines changed

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

overlay.nix

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,29 @@ _finalNixpkgs: prevNixpkgs: let
100100
rapidsnark-server = prevNixpkgs.callPackage ./packages/rapidsnark-server/default.nix {
101101
inherit ffiasm zqfield-bn254 rapidsnark pistache;
102102
};
103+
104+
py-ecc-410 = prevNixpkgs.python3Packages.py-ecc.overrideAttrs (finalAttrs: previousAttrs: {
105+
version = "4.1.0";
106+
107+
src = prevNixpkgs.fetchFromGitHub {
108+
owner = "ethereum";
109+
repo = "py_ecc";
110+
rev = "v4.1.0";
111+
hash = "sha256-qs4dvfdrl6o74FAst6XBAvzjJ7ZCA58s447aCTGIt2Y=";
112+
};
113+
});
114+
115+
eth-utils-110 = prevNixpkgs.python3Packages.eth-utils.overrideAttrs (finalAttrs: previousAttrs: {
116+
version = "1.10.0";
117+
118+
src = prevNixpkgs.fetchFromGitHub {
119+
owner = "ethereum";
120+
repo = "eth-utils";
121+
rev = "v1.10.0";
122+
sha256 = "sha256-sq3H4HmUFUipqVYleZxWLG1gBsQEoNwcZAXiKckacek=";
123+
};
124+
});
125+
mythril = prevNixpkgs.callPackage ./packages/python-modules/mythril/default.nix {inherit py-ecc-410 eth-utils-110;};
103126
in {
104127
metacraft-labs = rec {
105128
solana = solana-full-sdk;
@@ -135,5 +158,7 @@ in {
135158
inherit circom_runtime;
136159
inherit rapidsnark;
137160
inherit rapidsnark-server;
161+
162+
inherit eth-utils-110 mythril;
138163
};
139164
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
lib,
3+
stdenv,
4+
python3Packages,
5+
fetchFromGitHub,
6+
py-ecc-410,
7+
eth-utils-110,
8+
}:
9+
python3Packages.buildPythonPackage rec {
10+
pname = "mythril";
11+
version = "0.23.17";
12+
format = "setuptools";
13+
14+
disabled = python3Packages.pythonOlder "3.6";
15+
16+
src = fetchFromGitHub {
17+
owner = "ConsenSys";
18+
repo = "mythril";
19+
rev = "v${version}";
20+
hash = "sha256-lzxAhaQfiGygxI98x1hWP8wrHVbf9DuZuEnjJcKMRCo=";
21+
};
22+
23+
nativeBuildInputs = [
24+
];
25+
26+
propagatedBuildInputs = with python3Packages; [
27+
py-ecc-410
28+
eth-utils-110
29+
setuptools
30+
];
31+
32+
# postFixup = lib.optionalString withSolc ''
33+
# wrapProgram $out/bin/myhtril \
34+
# --prefix PATH : "${lib.makeBinPath [solc]}"
35+
# '';
36+
37+
# No Python tests
38+
doCheck = false;
39+
40+
meta = with lib; {
41+
description = "Security analysis tool for EVM bytecode.";
42+
longDescription = ''
43+
Mythril is a security analysis tool for EVM bytecode. It detects security vulnerabilities in smart contracts built
44+
for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains. It uses
45+
symbolic execution, SMT solving and taint analysis to detect a variety of security vulnerabilities. It's also used
46+
(in combination with other tools and techniques) in the MythX security analysis platform.
47+
'';
48+
homepage = "https://github.com/ConsenSys/mythril";
49+
license = licenses.mit;
50+
};
51+
}

0 commit comments

Comments
 (0)