1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 cython,
6 poetry-core,
7 setuptools,
8 fnvhash,
9 pytest-codspeed,
10 pytest-cov-stub,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "fnv-hash-fast";
16 version = "1.5.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "bdraco";
21 repo = "fnv-hash-fast";
22 tag = "v${version}";
23 hash = "sha256-yhn39QEIZQqY/6W2rhUff45tQzap9N6OPiP/Z9oEz8U=";
24 };
25
26 build-system = [
27 cython
28 poetry-core
29 setuptools
30 ];
31
32 dependencies = [ fnvhash ];
33
34 pythonRelaxDeps = [ "fnvhash" ];
35
36 pythonImportsCheck = [ "fnv_hash_fast" ];
37
38 nativeCheckInputs = [
39 pytest-codspeed
40 pytest-cov-stub
41 pytestCheckHook
42 ];
43
44 meta = with lib; {
45 description = "Fast version of fnv1a";
46 homepage = "https://github.com/bdraco/fnv-hash-fast";
47 changelog = "https://github.com/bdraco/fnv-hash-fast/blob/${src.tag}/CHANGELOG.md";
48 license = licenses.mit;
49 maintainers = with maintainers; [ hexa ];
50 };
51}