nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 # dependencies
7 cached-property,
8 ckzg,
9 eth-bloom,
10 eth-keys,
11 eth-typing,
12 eth-utils,
13 lru-dict,
14 pydantic,
15 py-ecc,
16 rlp,
17 trie,
18 # nativeCheckInputs
19 factory-boy,
20 hypothesis,
21 pytestCheckHook,
22 pytest-xdist,
23 eth-hash,
24}:
25
26buildPythonPackage rec {
27 pname = "py-evm";
28 version = "0.12.1-beta.1";
29 pyproject = true;
30
31 src = fetchFromGitHub {
32 owner = "ethereum";
33 repo = "py-evm";
34 tag = "v${version}";
35 hash = "sha256-n2F0ApdmIED0wrGuNN45lyb7cGu8pRn8mLDehT7Ru9E=";
36 };
37
38 build-system = [ setuptools ];
39
40 dependencies = [
41 cached-property
42 ckzg
43 eth-bloom
44 eth-keys
45 eth-typing
46 eth-utils
47 lru-dict
48 pydantic
49 py-ecc
50 rlp
51 trie
52 ];
53
54 nativeCheckInputs = [
55 factory-boy
56 hypothesis
57 pytestCheckHook
58 pytest-xdist
59 ]
60 ++ eth-hash.optional-dependencies.pycryptodome;
61
62 pytestFlags = [
63 # 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
64 "-Wignore::DeprecationWarning"
65 ];
66
67 disabledTests = [
68 # side-effect: runs pip online check and is blocked by sandbox
69 "test_install_local_wheel"
70 ];
71
72 disabledTestPaths = [
73 # json-fixtures require fixture submodule and execution spec
74 "tests/json-fixtures"
75 ];
76
77 pythonImportsCheck = [ "eth" ];
78
79 meta = {
80 description = "Python implementation of the Ethereum Virtual Machine";
81 homepage = "https://github.com/ethereum/py-evm";
82 license = lib.licenses.mit;
83 maintainers = with lib.maintainers; [ hellwolf ];
84 };
85}