Update aider (#375634)
[NixPkgs.git] / pkgs / development / python-modules / weconnect-mqtt / default.nix
blob19a2cd2fb32baeeb47bc8b8b551cf1f63273d1cd
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   paho-mqtt_2,
6   pytest-cov-stub,
7   pytestCheckHook,
8   python-dateutil,
9   pythonOlder,
10   setuptools,
11   weconnect,
14 buildPythonPackage rec {
15   pname = "weconnect-mqtt";
16   version = "0.49.2";
17   pyproject = true;
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "tillsteinbach";
23     repo = "WeConnect-mqtt";
24     tag = "v${version}";
25     hash = "sha256-jTScDPTj7aIQcGuL2g8MvuYln6iaj6abEyCfd8vvT2I=";
26   };
28   postPatch = ''
29     substituteInPlace weconnect_mqtt/__version.py \
30       --replace-fail "0.0.0dev" "${version}"
31     substituteInPlace requirements.txt \
32       --replace-fail "weconnect[Images]~=" "weconnect>="
33     substituteInPlace pytest.ini \
34       --replace-fail "required_plugins = pytest-cov" ""
35   '';
37   pythonRelaxDeps = [ "python-dateutil" ];
39   build-system = [ setuptools ];
41   dependencies = [
42     paho-mqtt_2
43     python-dateutil
44     weconnect
45   ] ++ weconnect.optional-dependencies.Images;
47   nativeCheckInputs = [
48     pytest-cov-stub
49     pytestCheckHook
50   ];
52   pythonImportsCheck = [ "weconnect_mqtt" ];
54   meta = {
55     description = "Python client that publishes data from Volkswagen WeConnect";
56     homepage = "https://github.com/tillsteinbach/WeConnect-mqtt";
57     changelog = "https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/v${version}";
58     license = lib.licenses.mit;
59     maintainers = with lib.maintainers; [ fab ];
60     mainProgram = "weconnect-mqtt";
61   };