1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 # dependencies
7 eth-hash,
8 # nativeCheckInputs
9 hypothesis,
10 pytestCheckHook,
11 pytest-xdist,
12}:
13
14buildPythonPackage rec {
15 pname = "eth-bloom";
16 version = "3.1.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "ethereum";
21 repo = "eth-bloom";
22 tag = "v${version}";
23 hash = "sha256-WrBLFICPyb+1bIitHZ172A1p1VYqLR75YfJ5/IBqDr8=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [ eth-hash ];
29
30 nativeCheckInputs = [
31 hypothesis
32 pytestCheckHook
33 pytest-xdist
34 ] ++ eth-hash.optional-dependencies.pycryptodome;
35
36 pythonImportsCheck = [ "eth_bloom" ];
37
38 disabledTests = [
39 # not testable in nix build
40 "test_install_local_wheel"
41 ];
42
43 meta = {
44 description = "Implementation of the Ethereum bloom filter";
45 homepage = "https://github.com/ethereum/eth-bloom";
46 changelog = "https://github.com/ethereum/eth-bloom/blob/v${version}/CHANGELOG.rst";
47 license = lib.licenses.mit;
48 maintainers = with lib.maintainers; [ hellwolf ];
49 };
50}