2022-11-04 12:27:35 +00:00
|
|
|
{ lib
|
|
|
|
, bleak
|
|
|
|
, bleak-retry-connector
|
|
|
|
, bluetooth-sensor-state-data
|
|
|
|
, buildPythonPackage
|
|
|
|
, events
|
|
|
|
, fetchFromGitHub
|
|
|
|
, freezegun
|
|
|
|
, home-assistant-bluetooth
|
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, transitions
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysnooz";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.8.5";
|
2022-11-04 12:27:35 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AustinBrunkhorst";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-X7RjI4KytJI9raHAJHLygV3J4zHKuHk8Kq+3JfktPeg=";
|
2022-11-04 12:27:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'transitions = "^0.8.11"' 'transitions = ">0.8.11"' \
|
|
|
|
--replace " --cov=pysnooz --cov-report=term-missing:skip-covered" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bleak
|
|
|
|
bleak-retry-connector
|
|
|
|
bluetooth-sensor-state-data
|
|
|
|
events
|
|
|
|
home-assistant-bluetooth
|
|
|
|
transitions
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-04 12:27:35 +00:00
|
|
|
freezegun
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pysnooz"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to control SNOOZ white noise machines";
|
|
|
|
homepage = "https://github.com/AustinBrunkhorst/pysnooz";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|