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