1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, eth-keys
5, eth-utils
6, pycryptodome
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "eth-keyfile";
13 version = "0.6.0";
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "ethereum";
18 repo = "eth-keyfile";
19 rev = "v${version}";
20 fetchSubmodules = true;
21 hash = "sha256-JD4bRoD9L0JXcd+bTZrq/BkWw5QGzOi1RvoyLJC77kk=";
22 };
23
24 postPatch = ''
25 substituteInPlace setup.py \
26 --replace "'setuptools-markdown'" ""
27 '';
28
29 propagatedBuildInputs = [
30 eth-keys
31 eth-utils
32 pycryptodome
33 ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [ "eth_keyfile" ];
40
41 meta = with lib; {
42 description = "Tools for handling the encrypted keyfile format used to store private keys";
43 homepage = "https://github.com/ethereum/eth-keyfile";
44 license = licenses.mit;
45 maintainers = with maintainers; [ ];
46 };
47}