1{ 2 lib, 3 buildPythonPackage, 4 cython, 5 fetchPypi, 6 fetchpatch, 7 pythonOlder, 8 setuptools, 9}: 10 11buildPythonPackage rec { 12 pname = "clickhouse-cityhash"; 13 version = "1.0.2.4"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-ezEl19CqE8LMTnWDqWWmv7CqlqEhMUdbRCVSustV9Pg="; 21 }; 22 23 nativeBuildInputs = [ 24 cython 25 setuptools 26 ]; 27 28 patches = [ 29 (fetchpatch { 30 # Cython 3.1 removed long() function. 31 # https://github.com/xzkostyan/clickhouse-cityhash/pull/6 32 url = "https://github.com/thevar1able/clickhouse-cityhash/commit/1109fc80e24cb44ec9ee2885e1e5cce7141c7ad8.patch"; 33 hash = "sha256-DcmASvDK160IokC5OuZoXpAHKbBOReGs96SU7yW9Ncc="; 34 }) 35 ]; 36 37 doCheck = false; 38 39 pythonImportsCheck = [ "clickhouse_cityhash" ]; 40 41 meta = with lib; { 42 description = "Python-bindings for CityHash, a fast non-cryptographic hash algorithm"; 43 homepage = "https://github.com/xzkostyan/python-cityhash"; 44 license = licenses.upl; 45 maintainers = with maintainers; [ breakds ]; 46 }; 47}