mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-11-29 01:10:12 +00:00
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
async-timeout,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
pytest-cov-stub,
|
|
setuptools,
|
|
tenacity,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "aiokef";
|
|
version = "0.2.17";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "basnijholt";
|
|
repo = "aiokef";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-afZbMIH3HlamGYSF66S9sVC/z7XrXrZ1KRwgeTNvQFc=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace tox.ini \
|
|
--replace "--mypy" ""
|
|
# For python3.14 compatability
|
|
substituteInPlace aiokef/aiokef.py \
|
|
--replace-fail 'self._loop = loop or asyncio.get_event_loop()' \
|
|
'self._loop = loop if loop is not None else asyncio.new_event_loop()'
|
|
'';
|
|
|
|
dependencies = [
|
|
async-timeout
|
|
tenacity
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-cov-stub
|
|
];
|
|
|
|
enabledTestPaths = [ "tests" ];
|
|
pythonImportsCheck = [ "aiokef" ];
|
|
|
|
meta = {
|
|
description = "Python API for KEF speakers";
|
|
homepage = "https://github.com/basnijholt/aiokef";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
};
|
|
})
|