1{ stdenv
2, lib
3, async-timeout
4, buildPythonPackage
5, fetchFromGitHub
6, pytest-asyncio
7, pytest-mock
8, pytestCheckHook
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 pname = "pescea";
14 version = "1.0.12";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "lazdavila";
21 repo = pname;
22 # https://github.com/lazdavila/pescea/issues/4
23 rev = "a3dd7deedc64205e24adbc4ff406a2f6aed3b240";
24 hash = "sha256-5TkFrGaSkQOORhf5a7SjkzggFLPyqe9k3M0B4ljhWTQ=";
25 };
26
27 propagatedBuildInputs = [
28 async-timeout
29 ];
30
31 nativeCheckInputs = [
32 pytest-asyncio
33 pytest-mock
34 pytestCheckHook
35 ];
36
37 postPatch = ''
38 # https://github.com/lazdavila/pescea/pull/1
39 substituteInPlace setup.py \
40 --replace '"asyncio",' ""
41 '';
42
43 disabledTests = [
44 # AssertionError: assert <State.BUSY: 'BusyWaiting'>...
45 "test_updates_while_busy"
46 # Test requires network access
47 "test_flow_control"
48 ];
49
50 pythonImportsCheck = [
51 "pescea"
52 ];
53
54 meta = with lib; {
55 broken = stdenv.isDarwin;
56 description = "Python interface to Escea fireplaces";
57 homepage = "https://github.com/lazdavila/pescea";
58 license = licenses.gpl3Plus;
59 maintainers = with maintainers; [ fab ];
60 };
61}