2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
async-timeout,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2021-12-19 01:06:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pescea";
|
2022-09-11 15:47:08 +00:00
|
|
|
version = "1.0.12";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lazdavila";
|
|
|
|
repo = pname;
|
2022-09-11 15:47:08 +00:00
|
|
|
# https://github.com/lazdavila/pescea/issues/4
|
|
|
|
rev = "a3dd7deedc64205e24adbc4ff406a2f6aed3b240";
|
|
|
|
hash = "sha256-5TkFrGaSkQOORhf5a7SjkzggFLPyqe9k3M0B4ljhWTQ=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ async-timeout ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-19 01:06:50 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/lazdavila/pescea/pull/1
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"asyncio",' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: assert <State.BUSY: 'BusyWaiting'>...
|
|
|
|
"test_updates_while_busy"
|
|
|
|
# Test requires network access
|
|
|
|
"test_flow_control"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pescea" ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-11-21 17:40:18 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2021-12-19 01:06:50 +00:00
|
|
|
description = "Python interface to Escea fireplaces";
|
|
|
|
homepage = "https://github.com/lazdavila/pescea";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|