Skip to content

Commit 4516526

Browse files
committed
eth-keyfile-051 eth-keys-034
1 parent 721568c commit 4516526

File tree

2 files changed

+77
-11
lines changed

2 files changed

+77
-11
lines changed

overlay.nix

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ _finalNixpkgs: prevNixpkgs: let
1515
wasmd = prevNixpkgs.callPackage ./packages/wasmd/default.nix {};
1616

1717
# erdpy depends on cattrs >= 22.2
18-
cattrs22-2 = prevNixpkgs.python3Packages.cattrs.overrideAttrs (finalAttrs: previousAttrs: {
18+
cattrs22-2 = prevNixpkgs.python3Packages.cattrs.overridePythonAttrs (previousAttrs: rec {
1919
version = "22.2.0";
2020

2121
src = prevNixpkgs.fetchFromGitHub {
2222
owner = "python-attrs";
2323
repo = "cattrs";
24-
rev = "v22.2.0";
24+
rev = "v${version}";
2525
hash = "sha256-Qnrq/mIA/t0mur6IAen4vTmMIhILWS6v5nuf+Via2hA=";
2626
};
2727

@@ -101,28 +101,90 @@ _finalNixpkgs: prevNixpkgs: let
101101
inherit ffiasm zqfield-bn254 rapidsnark pistache;
102102
};
103103

104-
py-ecc-410 = prevNixpkgs.python3Packages.py-ecc.overrideAttrs (finalAttrs: previousAttrs: {
105-
version = "4.1.0";
104+
eth-typing-230 = prevNixpkgs.python3Packages.eth-typing.overridePythonAttrs (old: rec {
105+
version = "2.3.0";
106106

107107
src = prevNixpkgs.fetchFromGitHub {
108108
owner = "ethereum";
109-
repo = "py_ecc";
110-
rev = "v4.1.0";
111-
hash = "sha256-qs4dvfdrl6o74FAst6XBAvzjJ7ZCA58s447aCTGIt2Y=";
109+
repo = "eth-typing";
110+
rev = "c3210d5e2b867f781c297b5c01ada6c399bc402b"; # commit hash for v2.3.0, as nix has trouble fetching the tag.
111+
sha256 = "sha256-cuA6vSfCfqgffEhSEuVeKJfxsGLw1mGID9liodE9wcU=";
112112
};
113113
});
114114

115-
eth-utils-110 = prevNixpkgs.python3Packages.eth-utils.overrideAttrs (finalAttrs: previousAttrs: {
115+
eth-utils-110 = prevNixpkgs.python3Packages.eth-utils.overrideAttrs (old: rec {
116116
version = "1.10.0";
117117

118118
src = prevNixpkgs.fetchFromGitHub {
119119
owner = "ethereum";
120120
repo = "eth-utils";
121-
rev = "v1.10.0";
121+
rev = "v${version}";
122122
sha256 = "sha256-sq3H4HmUFUipqVYleZxWLG1gBsQEoNwcZAXiKckacek=";
123123
};
124+
125+
propagatedBuildInputs =
126+
[prevNixpkgs.python3Packages.eth-hash eth-typing-230]
127+
++ prevNixpkgs.lib.optional (!prevNixpkgs.python3Packages.isPyPy) prevNixpkgs.python3Packages.cytoolz
128+
++ prevNixpkgs.lib.optional prevNixpkgs.python3Packages.isPyPy prevNixpkgs.python3Packages.toolz;
129+
});
130+
131+
py-ecc-410 = prevNixpkgs.python3Packages.py-ecc.overridePythonAttrs (old: rec {
132+
version = "4.1.0";
133+
134+
src = prevNixpkgs.fetchFromGitHub {
135+
owner = "ethereum";
136+
repo = "py_ecc";
137+
rev = "v${version}";
138+
hash = "sha256-qs4dvfdrl6o74FAst6XBAvzjJ7ZCA58s447aCTGIt2Y=";
139+
};
140+
141+
propagatedBuildInputs = with prevNixpkgs.python3Packages; [
142+
cached-property
143+
eth-typing-230
144+
eth-utils-110
145+
mypy-extensions
146+
];
147+
});
148+
149+
eth-keys-034 = prevNixpkgs.python3Packages.eth-keys.overridePythonAttrs (old: rec {
150+
version = "0.3.4";
151+
152+
src = prevNixpkgs.fetchFromGitHub {
153+
owner = "ethereum";
154+
repo = "eth-keys";
155+
rev = "v${version}";
156+
fetchSubmodules = true;
157+
sha256 = "sha256-P/5v4fk6gtbXju+xyDE9enAsmch+gquzvYUIn4Kvs0Y=";
158+
};
159+
160+
propagatedBuildInputs = [
161+
eth-utils-110
162+
eth-typing-230
163+
];
164+
165+
disabledTests = old.disabledTests ++ ["test_coincurve_to_native_invalid_signatures"];
166+
});
167+
168+
eth-keyfile-051 = prevNixpkgs.python3Packages.eth-keyfile.overridePythonAttrs (old: rec {
169+
version = "0.5.1";
170+
171+
src = prevNixpkgs.fetchFromGitHub {
172+
owner = "ethereum";
173+
repo = "eth-keyfile";
174+
rev = "v${version}";
175+
fetchSubmodules = true;
176+
leaveDotGit = true;
177+
sha256 = "sha256-IG2zO0XnI96UptDmvrBn+wG64oSSRakUBsc8QTsR/NE=";
178+
};
179+
180+
propagatedBuildInputs = [
181+
eth-utils-110
182+
eth-keys-034
183+
prevNixpkgs.python3Packages.pycryptodome
184+
prevNixpkgs.python3Packages.setuptools
185+
];
124186
});
125-
mythril = prevNixpkgs.callPackage ./packages/python-modules/mythril/default.nix {inherit py-ecc-410 eth-utils-110;};
187+
mythril = prevNixpkgs.callPackage ./packages/python-modules/mythril/default.nix {inherit py-ecc-410 eth-utils-110 eth-keyfile-051 eth-typing-230;};
126188
in {
127189
metacraft-labs = rec {
128190
solana = solana-full-sdk;
@@ -159,6 +221,6 @@ in {
159221
inherit rapidsnark;
160222
inherit rapidsnark-server;
161223

162-
inherit eth-utils-110 mythril;
224+
inherit eth-keyfile-051 mythril;
163225
};
164226
}

packages/python-modules/mythril/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
fetchFromGitHub,
66
py-ecc-410,
77
eth-utils-110,
8+
eth-keyfile-051,
9+
eth-typing-230,
810
}:
911
python3Packages.buildPythonPackage rec {
1012
pname = "mythril";
@@ -25,7 +27,9 @@ python3Packages.buildPythonPackage rec {
2527

2628
propagatedBuildInputs = with python3Packages; [
2729
py-ecc-410
30+
eth-typing-230
2831
eth-utils-110
32+
eth-keyfile-051
2933
setuptools
3034
];
3135

0 commit comments

Comments
 (0)