2021-01-05 12:04:29 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, cffi, crc32c, pytestCheckHook }:
|
2020-09-21 14:10:08 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-crc32c";
|
2021-01-21 11:02:38 +00:00
|
|
|
version = "1.1.2";
|
2020-09-21 14:10:08 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "googleapis";
|
|
|
|
repo = "python-crc32c";
|
|
|
|
rev = "v${version}";
|
2021-01-21 11:02:38 +00:00
|
|
|
sha256 = "058g69yp7x41mv0d84yp31jv64fpm4r25b86rvvqgc6n74w6jj7k";
|
2020-09-21 14:10:08 +01:00
|
|
|
};
|
|
|
|
|
2021-01-05 12:04:29 +00:00
|
|
|
buildInputs = [ crc32c ];
|
|
|
|
|
2020-09-21 14:10:08 +01:00
|
|
|
propagatedBuildInputs = [ cffi ];
|
|
|
|
|
|
|
|
LDFLAGS = "-L${crc32c}/lib";
|
|
|
|
CFLAGS = "-I${crc32c}/include";
|
|
|
|
|
|
|
|
checkInputs = [ pytestCheckHook crc32c ];
|
2021-01-05 12:04:29 +00:00
|
|
|
|
2020-09-21 14:10:08 +01: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 ];
|
2021-01-05 12:04:29 +00:00
|
|
|
maintainers = with maintainers; [ freezeboy SuperSandro2000 ];
|
2020-09-21 14:10:08 +01:00
|
|
|
};
|
|
|
|
}
|