567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
cython,
|
|
fetchPypi,
|
|
fetchpatch,
|
|
pythonOlder,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "clickhouse-cityhash";
|
|
version = "1.0.2.4";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-ezEl19CqE8LMTnWDqWWmv7CqlqEhMUdbRCVSustV9Pg=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cython
|
|
setuptools
|
|
];
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
# Cython 3.1 removed long() function.
|
|
# https://github.com/xzkostyan/clickhouse-cityhash/pull/6
|
|
url = "https://github.com/thevar1able/clickhouse-cityhash/commit/1109fc80e24cb44ec9ee2885e1e5cce7141c7ad8.patch";
|
|
hash = "sha256-DcmASvDK160IokC5OuZoXpAHKbBOReGs96SU7yW9Ncc=";
|
|
})
|
|
];
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "clickhouse_cityhash" ];
|
|
|
|
meta = {
|
|
description = "Python-bindings for CityHash, a fast non-cryptographic hash algorithm";
|
|
homepage = "https://github.com/xzkostyan/python-cityhash";
|
|
license = lib.licenses.upl;
|
|
maintainers = with lib.maintainers; [ breakds ];
|
|
};
|
|
}
|