1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 # dependencies
7 eth-keys,
8 eth-utils,
9 pycryptodome,
10 # nativeCheckInputs
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "eth-keyfile";
16 version = "0.8.1";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "ethereum";
21 repo = "eth-keyfile";
22 tag = "v${version}";
23 fetchSubmodules = true;
24 hash = "sha256-HufsN3aXdQErcQmnG2PZnEm5joqpy4f8IWNm3VrzJSY=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [
30 eth-keys
31 eth-utils
32 pycryptodome
33 ];
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 pythonImportsCheck = [ "eth_keyfile" ];
38
39 meta = {
40 description = "Tools for handling the encrypted keyfile format used to store private keys";
41 homepage = "https://github.com/ethereum/eth-keyfile";
42 changelog = "https://github.com/ethereum/eth-keyfile/blob/v${version}/CHANGELOG.rst";
43 license = lib.licenses.mit;
44 maintainers = with lib.maintainers; [ hellwolf ];
45 };
46}