depot/third_party/nixpkgs/pkgs/development/python-modules/python-smarttub/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

56 lines
1,015 B
Nix

{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, inflection
, pyjwt
, pytest-asyncio
, pytestCheckHook
, python-dateutil
, pythonOlder
}:
buildPythonPackage rec {
pname = "python-smarttub";
version = "0.0.33";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "mdz";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-BGG5SQfVxhp6ID2Ob+afm75cInVixSPD5012K4HwthU=";
};
propagatedBuildInputs = [
aiohttp
inflection
pyjwt
python-dateutil
];
checkInputs = [
aresponses
pytest-asyncio
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace "pyjwt~=2.1.0" "pyjwt>=2.1.0"
'';
pythonImportsCheck = [
"smarttub"
];
meta = with lib; {
description = "Python API for SmartTub enabled hot tubs";
homepage = "https://github.com/mdz/python-smarttub";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}