Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / aiohue / default.nix
blob44ab0e99a9d0c7dcdfb25ebbb47c4df7f98d824f
1 { lib
2 , aiohttp
3 , asyncio-throttle
4 , awesomeversion
5 , buildPythonPackage
6 , fetchFromGitHub
7 , pytestCheckHook
8 , pytest-aiohttp
9 , pytest-asyncio
10 , pythonOlder
11 , setuptools
14 buildPythonPackage rec {
15   pname = "aiohue";
16   version = "4.7.1";
17   pyproject = true;
19   disabled = pythonOlder "3.10";
21   src = fetchFromGitHub {
22     owner = "home-assistant-libs";
23     repo = pname;
24     rev = "refs/tags/${version}";
25     hash = "sha256-/9kATmBNhKXt2PWB1pRdMJr+QzP23ajQK+jA8BuJ7J4=";
26   };
28   postPatch = ''
29     substituteInPlace pyproject.toml \
30       --replace 'version = "0.0.0"' 'version = "${version}"'
31   '';
33   nativeBuildInputs = [
34     setuptools
35   ];
37   propagatedBuildInputs = [
38     awesomeversion
39     aiohttp
40     asyncio-throttle
41   ];
43   nativeCheckInputs = [
44     pytestCheckHook
45     pytest-asyncio
46     pytest-aiohttp
47   ];
49   pythonImportsCheck = [
50     "aiohue"
51     "aiohue.discovery"
52   ];
54   disabledTestPaths = [
55     # File are prefixed with test_
56     "examples/"
57   ];
59   meta = with lib; {
60     description = "Python package to talk to Philips Hue";
61     homepage = "https://github.com/home-assistant-libs/aiohue";
62     changelog = "https://github.com/home-assistant-libs/aiohue/releases/tag/${version}";
63     license = with licenses; [ asl20 ];
64     maintainers = with maintainers; [ fab ];
65   };