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-05-18 14:49:53 +00:00
|
|
|
version = "0.34.0";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tillsteinbach";
|
|
|
|
repo = "WeConnect-mqtt";
|
|
|
|
rev = "v${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
sha256 = "sha256-Gj+hXgGkOqKnZ4W2iZ9P6JN3lYMoREMSF/wfGwLL/tc=";
|
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-02-20 05:27:41 +00:00
|
|
|
--replace "weconnect[Images]~=0.35.1" "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 ];
|
|
|
|
};
|
|
|
|
}
|