Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pysmartthings / default.nix
blob89b6ba537aec4dffda507296afcb4cc935047630
1 { lib
2 , aiohttp
3 , buildPythonPackage
4 , fetchFromGitHub
5 , pytest-asyncio
6 , pytestCheckHook
7 , pythonOlder
8 }:
10 buildPythonPackage rec {
11   pname = "pysmartthings";
12   version = "0.7.8";
13   format = "setuptools";
15   disabled = pythonOlder "3.8";
17   src = fetchFromGitHub {
18     owner = "andrewsayre";
19     repo = pname;
20     rev = version;
21     hash = "sha256-r+f2+vEXJdQGDlbs/MhraFgEmsAf32PU282blLRLjzc=";
22   };
24   postPatch = ''
25     substituteInPlace setup.py \
26       --replace "aiohttp>=3.8.0,<4.0.0" "aiohttp<=4.0.0"
27   '';
29   propagatedBuildInputs = [
30     aiohttp
31   ];
33   # https://github.com/andrewsayre/pysmartthings/issues/80
34   doCheck = lib.versionOlder aiohttp.version "3.9.0";
36   nativeCheckInputs = [
37     pytest-asyncio
38     pytestCheckHook
39   ];
41   pythonImportsCheck = [
42     "pysmartthings"
43   ];
45   meta = with lib; {
46     description = "Python library for interacting with the SmartThings cloud API";
47     homepage = "https://github.com/andrewsayre/pysmartthings";
48     changelog = "https://github.com/andrewsayre/pysmartthings/releases/tag/${version}";
49     license = with licenses; [ mit ];
50     maintainers = with maintainers; [ fab ];
51   };