792b51d22f
GitOrigin-RevId: d5f237872975e6fb6f76eef1368b5634ffcd266f
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, paho-mqtt
|
|
, weconnect
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "weconnect-mqtt";
|
|
version = "0.29.1";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tillsteinbach";
|
|
repo = "WeConnect-mqtt";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-/hFlH0naE62d2dyYIJD/+TuSQDOVgS8tQsSX8JuReC0=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
paho-mqtt
|
|
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.35.1" "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 ];
|
|
};
|
|
}
|