nixpkgs/pkgs/development/python-modules/hyperion-py/default.nix
Martin Weinelt 6584c787a7
python3Packages.hyperion-py: 0.7.4 -> 0.7.5
Disable on python3.10 as test hangs in socket operation, while other
tests fail due to unexpected loop argument.
2022-04-07 02:45:43 +02:00

59 lines
1.1 KiB
Nix

{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, pythonAtLeast
, poetry-core
, pytest-aiohttp
, pytest-asyncio
}:
buildPythonPackage rec {
pname = "hyperion-py";
version = "0.7.5";
disabled = pythonOlder "3.8" || pythonAtLeast "3.10";
format = "pyproject";
src = fetchFromGitHub {
owner = "dermotduffy";
repo = pname;
rev = "v${version}";
sha256 = "sha256-arcnpCQsRuiWCrAz/t4TCjTe8DRDtRuzYp8k7nnjGDk=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
];
checkInputs = [
pytest-asyncio
pytest-aiohttp
pytestCheckHook
];
pytestFlagsArray = [
# pytest-asyncio 0.17.0 compat
"--asyncio-mode=auto"
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --timeout=9 --cov=hyperion" ""
'';
pythonImportsCheck = [ "hyperion" ];
meta = with lib; {
description = "Python package for Hyperion Ambient Lighting";
homepage = "https://github.com/dermotduffy/hyperion-py";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}