summary refs log tree commit diff
path: root/pkgs/development/python-modules/eth-keyfile/default.nix
blob: e4320e8e035c81b12d8b5477e7c0c79089f80f87 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ lib
, buildPythonPackage
, fetchFromGitHub
, eth-keys
, eth-utils
, pycryptodome
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "eth-keyfile";
  version = "0.6.0";
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "ethereum";
    repo = "eth-keyfile";
    rev = "v${version}";
    fetchSubmodules = true;
    hash = "sha256-JD4bRoD9L0JXcd+bTZrq/BkWw5QGzOi1RvoyLJC77kk=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'setuptools-markdown'" ""
  '';

  propagatedBuildInputs = [
    eth-keys
    eth-utils
    pycryptodome
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [ "eth_keyfile" ];

  meta = with lib; {
    description = "Tools for handling the encrypted keyfile format used to store private keys";
    homepage = "https://github.com/ethereum/eth-keyfile";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}