2021-12-19 01:06:50 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, paho-mqtt
|
2022-03-05 16:20:37 +00:00
|
|
|
, python-dateutil
|
2021-12-19 01:06:50 +00:00
|
|
|
, weconnect
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "weconnect-mqtt";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.39.0";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tillsteinbach";
|
|
|
|
repo = "WeConnect-mqtt";
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
hash = "sha256-4qZWlICqYv8sewDfGbKSBGVVCtF/1BvYPc07gONZz8c=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
paho-mqtt
|
2022-03-05 16:20:37 +00:00
|
|
|
python-dateutil
|
2021-12-19 01:06:50 +00:00
|
|
|
weconnect
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace weconnect_mqtt/__version.py \
|
|
|
|
--replace "develop" "${version}"
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--cov=weconnect_mqtt --cov-config=.coveragerc --cov-report html" "" \
|
|
|
|
--replace "pytest-cov" ""
|
2022-02-10 20:34:41 +00:00
|
|
|
substituteInPlace requirements.txt \
|
2022-06-16 17:23:12 +00:00
|
|
|
--replace "weconnect[Images]~=0.40.0" "weconnect"
|
2021-12-19 01:06:50 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"weconnect_mqtt"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client that publishes data from Volkswagen WeConnect";
|
|
|
|
homepage = "https://github.com/tillsteinbach/WeConnect-mqtt";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|