2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cffi,
|
|
|
|
crc32c,
|
|
|
|
pytestCheckHook,
|
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-crc32c";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "1.5.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "googleapis";
|
|
|
|
repo = "python-crc32c";
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-Tx7UBIwKzSBbpuqdqGiXTbmBE+1MDRknVe3Zee0UHKQ=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
buildInputs = [ crc32c ];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [ cffi ];
|
|
|
|
|
|
|
|
LDFLAGS = "-L${crc32c}/lib";
|
|
|
|
CFLAGS = "-I${crc32c}/include";
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
crc32c
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
pythonImportsCheck = [ "google_crc32c" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/googleapis/python-crc32c";
|
|
|
|
description = "Wrapper the google/crc32c hardware-based implementation of the CRC32C hashing algorithm";
|
|
|
|
license = with licenses; [ asl20 ];
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ freezeboy ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|