2021-07-29 19:28:12 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
cffi,
|
|
|
|
brotli,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "brotlicffi";
|
2023-09-16 12:29:10 +00:00
|
|
|
version = "1.1.0.0";
|
2023-12-07 03:53:02 +00:00
|
|
|
format = "setuptools";
|
2023-09-16 12:29:10 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-07-29 19:28:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-hyper";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-09-16 12:29:10 +00:00
|
|
|
sha256 = "sha256-oW4y1WBJ7+4XwNwwSSR0qUqN03cZYXUYQ6EAwce9dzI=";
|
2021-07-29 19:28:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ brotli ];
|
|
|
|
|
2021-10-20 04:47:54 +00:00
|
|
|
propagatedNativeBuildInputs = [ cffi ];
|
|
|
|
|
2021-07-29 19:28:12 +00:00
|
|
|
propagatedBuildInputs = [ cffi ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export USE_SHARED_BROTLI=1
|
|
|
|
'';
|
|
|
|
|
2022-03-23 08:36:08 +00:00
|
|
|
# Test data is not available, only when using libbrotli git checkout
|
2021-07-29 19:28:12 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "brotlicffi" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python CFFI bindings to the Brotli library";
|
|
|
|
homepage = "https://github.com/python-hyper/brotlicffi";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|