b450903751
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, paho-mqtt
|
|
, python-dateutil
|
|
, weconnect
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "weconnect-mqtt";
|
|
version = "0.39.2";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tillsteinbach";
|
|
repo = "WeConnect-mqtt";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-htLyf7ouy/psG/BJr3nATQjd+bTFETjGEWQYs2uMtSM=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
paho-mqtt
|
|
python-dateutil
|
|
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" ""
|
|
substituteInPlace requirements.txt \
|
|
--replace "weconnect[Images]~=0.40.0" "weconnect"
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|