2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
requests-oauthlib,
|
|
|
|
voluptuous,
|
|
|
|
setuptools,
|
2021-02-05 17:12:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pybotvac";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.0.25";
|
|
|
|
pyproject = true;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-EvGBStEYgqFO9GMtxs1qtDixb4y2Ptom8xncRUv4ur4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pybotvac/robot.py \
|
|
|
|
--replace-fail "import urllib3" "" \
|
|
|
|
--replace-fail "urllib3.disable_warnings(urllib3.exceptions.SubjectAltNameWarning)" "# urllib3.disable_warnings(urllib3.exceptions.SubjectAltNameWarning)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2021-02-05 17:12:51 +00:00
|
|
|
requests
|
2022-04-27 09:35:20 +00:00
|
|
|
requests-oauthlib
|
2021-02-05 17:12:51 +00:00
|
|
|
voluptuous
|
|
|
|
];
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
# Module no tests
|
2021-02-05 17:12:51 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "pybotvac" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-02-05 17:12:51 +00:00
|
|
|
description = "Python module for interacting with Neato Botvac Connected vacuum robots";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/stianaske/pybotvac";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/stianaske/pybotvac/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-01-11 07:51:40 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|