nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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.10";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "lazdavila";
21 repo = pname;
22 rev = "v${version}";
23 sha256 = "Q38mLGjrRdXEvT+PCNsil1e2p0mmM0Xy8TUx9QOnFRA=";
24 };
25
26 propagatedBuildInputs = [
27 async-timeout
28 ];
29
30 checkInputs = [
31 pytest-asyncio
32 pytest-mock
33 pytestCheckHook
34 ];
35
36 postPatch = ''
37 # https://github.com/lazdavila/pescea/pull/1
38 substituteInPlace setup.py \
39 --replace '"asyncio",' ""
40 '';
41
42 disabledTests = [
43 # AssertionError: assert <State.BUSY: 'BusyWaiting'>...
44 "test_updates_while_busy"
45 # Test requires network access
46 "test_flow_control"
47 ];
48
49 pythonImportsCheck = [
50 "pescea"
51 ];
52
53 meta = with lib; {
54 broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
55 description = "Python interface to Escea fireplaces";
56 homepage = "https://github.com/lazdavila/pescea";
57 license = licenses.gpl3Plus;
58 maintainers = with maintainers; [ fab ];
59 };
60}