1{ lib
2, aiohttp
3, buildPythonPackage
4, fetchFromGitHub
5, pytestCheckHook
6, pythonOlder
7, poetry-core
8, pytest-aiohttp
9, pytest-asyncio
10}:
11
12buildPythonPackage rec {
13 pname = "hyperion-py";
14 version = "0.7.4";
15 disabled = pythonOlder "3.8";
16 format = "pyproject";
17
18 src = fetchFromGitHub {
19 owner = "dermotduffy";
20 repo = pname;
21 rev = "v${version}";
22 sha256 = "00x12ppmvlxs3qbdxq06wnzakvwm2m39qhmpp27qfpl137b0qqyj";
23 };
24
25 nativeBuildInputs = [
26 poetry-core
27 ];
28
29 propagatedBuildInputs = [
30 aiohttp
31 ];
32
33 checkInputs = [
34 pytest-asyncio
35 pytest-aiohttp
36 pytestCheckHook
37 ];
38
39 postPatch = ''
40 substituteInPlace pyproject.toml \
41 --replace " --timeout=9 --cov=hyperion" ""
42 '';
43
44 pythonImportsCheck = [ "hyperion" ];
45
46 meta = with lib; {
47 description = "Python package for Hyperion Ambient Lighting";
48 homepage = "https://github.com/dermotduffy/hyperion-py";
49 license = licenses.mit;
50 maintainers = with maintainers; [ fab ];
51 };
52}