2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
paho-mqtt,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
weconnect,
|
2021-12-19 01:06:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "weconnect-mqtt";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.48.4";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tillsteinbach";
|
|
|
|
repo = "WeConnect-mqtt";
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-Yv6CAGTDi4P9pImLxVk2QkZ014iqQ8UMBUeiyZWnYiQ=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace weconnect_mqtt/__version.py \
|
2024-02-29 20:09:43 +00:00
|
|
|
--replace-fail "0.0.0dev" "${version}"
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace-fail "weconnect[Images]~=" "weconnect>="
|
2021-12-19 01:06:50 +00:00
|
|
|
substituteInPlace pytest.ini \
|
2024-02-29 20:09:43 +00:00
|
|
|
--replace-fail "--cov=weconnect_mqtt --cov-config=.coveragerc --cov-report html" "" \
|
|
|
|
--replace-fail "pytest-cov" ""
|
2021-12-19 01:06:50 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "python-dateutil" ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
|
|
|
|
dependencies = [
|
2023-03-04 12:14:45 +00:00
|
|
|
paho-mqtt
|
|
|
|
python-dateutil
|
|
|
|
weconnect
|
|
|
|
] ++ weconnect.optional-dependencies.Images;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "weconnect_mqtt" ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client that publishes data from Volkswagen WeConnect";
|
|
|
|
homepage = "https://github.com/tillsteinbach/WeConnect-mqtt";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/v${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2024-06-05 15:53:02 +00:00
|
|
|
mainProgram = "weconnect-mqtt";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
}
|