1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 eth-hash,
7 eth-utils,
8 hexbytes,
9 pytestCheckHook,
10 pythonOlder,
11 rlp,
12 pydantic,
13}:
14
15buildPythonPackage rec {
16 pname = "eth-rlp";
17 version = "2.2.0";
18 pyproject = true;
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "ethereum";
23 repo = "eth-rlp";
24 rev = "v${version}";
25 hash = "sha256-e8nPfxk3OnFEcPnfTy1IEUCHVId6E/ssNOUeAe331+U=";
26 };
27
28 build-system = [ setuptools ];
29
30 propagatedBuildInputs = [
31 hexbytes
32 eth-utils
33 rlp
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 pydantic
39 ]
40 ++ eth-hash.optional-dependencies.pycryptodome;
41
42 pythonImportsCheck = [ "eth_rlp" ];
43
44 disabledTests = [
45 "test_install_local_wheel"
46 ];
47
48 meta = with lib; {
49 description = "RLP definitions for common Ethereum objects";
50 homepage = "https://github.com/ethereum/eth-rlp";
51 license = licenses.mit;
52 maintainers = [ ];
53 };
54}