Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pysmartthings / default.nix
blob369cd6ecea6e9d9462ecc9c2e334cc63ecab2f29
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   propagatedBuildInputs = [
25     aiohttp
26   ];
28   nativeCheckInputs = [
29     pytest-asyncio
30     pytestCheckHook
31   ];
33   postPatch = ''
34     substituteInPlace setup.py \
35       --replace "aiohttp>=3.8.0,<4.0.0" "aiohttp<=4.0.0"
36   '';
38   pythonImportsCheck = [
39     "pysmartthings"
40   ];
42   meta = with lib; {
43     description = "Python library for interacting with the SmartThings cloud API";
44     homepage = "https://github.com/andrewsayre/pysmartthings";
45     changelog = "https://github.com/andrewsayre/pysmartthings/releases/tag/${version}";
46     license = with licenses; [ mit ];
47     maintainers = with maintainers; [ fab ];
48   };