Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cffi, 6 crc32c, 7 pytestCheckHook, 8}: 9 10buildPythonPackage rec { 11 pname = "google-crc32c"; 12 version = "1.5.0"; 13 format = "setuptools"; 14 15 src = fetchFromGitHub { 16 owner = "googleapis"; 17 repo = "python-crc32c"; 18 rev = "v${version}"; 19 hash = "sha256-Tx7UBIwKzSBbpuqdqGiXTbmBE+1MDRknVe3Zee0UHKQ="; 20 }; 21 22 buildInputs = [ crc32c ]; 23 24 propagatedBuildInputs = [ cffi ]; 25 26 LDFLAGS = "-L${crc32c}/lib"; 27 CFLAGS = "-I${crc32c}/include"; 28 29 nativeCheckInputs = [ 30 pytestCheckHook 31 crc32c 32 ]; 33 34 pythonImportsCheck = [ "google_crc32c" ]; 35 36 meta = with lib; { 37 homepage = "https://github.com/googleapis/python-crc32c"; 38 description = "Wrapper the google/crc32c hardware-based implementation of the CRC32C hashing algorithm"; 39 license = with licenses; [ asl20 ]; 40 maintainers = with maintainers; [ freezeboy ]; 41 }; 42}