1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, eth-abi
5, py-ecc
6, pycryptodome
7, python
8, rlp
9}:
10
11buildPythonPackage rec {
12 pname = "py-eth-sig-utils";
13 version = "0.4.0";
14
15 src = fetchFromGitHub {
16 owner = "rmeissner";
17 repo = "py-eth-sig-utils";
18 rev = "v${version}";
19 hash = "sha256-PNvEHH5w2ptntRGzqWrqlbIzJJsT60OXg/Dh5f6Wq9k=";
20 };
21
22 propagatedBuildInputs = [
23 eth-abi
24 py-ecc
25 pycryptodome
26 rlp
27 ];
28
29 # lots of: isinstance() arg 2 must be a type or tuple of types
30 doCheck = false;
31
32 checkPhase = ''
33 ${python.interpreter} -m unittest
34 '';
35
36 pythonImportsCheck = [ "py_eth_sig_utils" ];
37
38 meta = with lib; {
39 description = "Collection of functions to generate hashes for signing on Ethereum";
40 homepage = "https://github.com/rmeissner/py-eth-sig-utils";
41 license = licenses.mit;
42 maintainers = with maintainers; [ SuperSandro2000 ];
43 };
44}