about summary refs log tree commit diff
path: root/pkgs/development/python-modules/py-eth-sig-utils/default.nix
blob: 8ede11e35903163b1033d702b0b8c6953586ea7e (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, eth-abi
, py-ecc
, pycryptodome
, python
, rlp
}:

buildPythonPackage rec {
  pname = "py-eth-sig-utils";
  version = "0.4.0";

  src = fetchFromGitHub {
    owner = "rmeissner";
    repo = "py-eth-sig-utils";
    rev = "v${version}";
    hash = "sha256-PNvEHH5w2ptntRGzqWrqlbIzJJsT60OXg/Dh5f6Wq9k=";
  };

  propagatedBuildInputs = [
    eth-abi
    py-ecc
    pycryptodome
    rlp
  ];

  # lots of: isinstance() arg 2 must be a type or tuple of types
  doCheck = false;

  checkPhase = ''
    ${python.interpreter} -m unittest
  '';

  pythonImportsCheck = [ "py_eth_sig_utils" ];

  meta = with lib; {
    description = "Collection of functions to generate hashes for signing on Ethereum";
    homepage = "https://github.com/rmeissner/py-eth-sig-utils";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
    # TODO: upstream is stale and doesn't not work with the new `eth-abi` package any more.
    broken = true;
  };
}