at 24.11-pre 50 lines 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cython, 6 poetry-core, 7 setuptools, 8 wheel, 9 fnvhash, 10 pytestCheckHook, 11}: 12 13buildPythonPackage rec { 14 pname = "fnv-hash-fast"; 15 version = "0.5.0"; 16 format = "pyproject"; 17 18 src = fetchFromGitHub { 19 owner = "bdraco"; 20 repo = "fnv-hash-fast"; 21 rev = "v${version}"; 22 hash = "sha256-gAHCssJC6sTR6ftkQHrtF/5Nf9dXE4ykRhVusb0Gu3I="; 23 }; 24 25 postPatch = '' 26 substituteInPlace pyproject.toml \ 27 --replace "--cov=fnv_hash_fast --cov-report=term-missing:skip-covered" "" 28 ''; 29 30 nativeBuildInputs = [ 31 cython 32 poetry-core 33 setuptools 34 wheel 35 ]; 36 37 propagatedBuildInputs = [ fnvhash ]; 38 39 pythonImportsCheck = [ "fnv_hash_fast" ]; 40 41 nativeCheckInputs = [ pytestCheckHook ]; 42 43 meta = with lib; { 44 description = "A fast version of fnv1a"; 45 homepage = "https://github.com/bdraco/fnv-hash-fast"; 46 changelog = "https://github.com/bdraco/fnv-hash-fast/blob/${src.rev}/CHANGELOG.md"; 47 license = licenses.mit; 48 maintainers = with maintainers; [ hexa ]; 49 }; 50}