2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
zlib-ng,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiohttp-zlib-ng";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "0.3.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bdraco";
|
|
|
|
repo = "aiohttp-zlib-ng";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-SiDDtadbBnw67lnqadAVSkHILB/8Sur0MfjgCbndX4o=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-02-29 20:09:43 +00:00
|
|
|
--replace-fail " --cov=aiohttp_zlib_ng --cov-report=term-missing:skip-covered" ""
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
zlib-ng
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aiohttp_zlib_ng" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Enable zlib_ng on aiohttp";
|
|
|
|
homepage = "https://github.com/bdraco/aiohttp-zlib-ng";
|
|
|
|
changelog = "https://github.com/bdraco/aiohttp-zlib-ng/blob/${version}/CHANGELOG.md";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|