1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 meson, 6 meson-python, 7 cython, 8 pkg-config, 9 c-siphash, 10 pytestCheckHook, 11}: 12 13buildPythonPackage rec { 14 version = "1.8"; 15 pname = "siphash24"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "dnicolodi"; 20 repo = "python-siphash24"; 21 tag = "v${version}"; 22 hash = "sha256-51LgmB30MDTBRoZttIESopWMdrozvLFwlxYELmqu5UQ="; 23 }; 24 25 nativeBuildInputs = [ pkg-config ]; 26 27 build-system = [ 28 meson 29 meson-python 30 cython 31 ]; 32 33 buildInputs = [ 34 c-siphash 35 ]; 36 37 pythonImportsCheck = [ 38 "siphash24" 39 ]; 40 41 enabledTestPaths = [ "test.py" ]; 42 43 nativeCheckInputs = [ pytestCheckHook ]; 44 45 meta = { 46 homepage = "https://github.com/dnicolodi/python-siphash24"; 47 description = "Streaming-capable SipHash Implementation"; 48 changelog = "https://github.com/dnicolodi/python-siphash24/releases/tag/${src.tag}"; 49 license = lib.licenses.lgpl2Plus; 50 maintainers = with lib.maintainers; [ qbisi ]; 51 }; 52}