nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 55 lines 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6, paho-mqtt 7, python-dateutil 8, weconnect 9}: 10 11buildPythonPackage rec { 12 pname = "weconnect-mqtt"; 13 version = "0.34.0"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "tillsteinbach"; 20 repo = "WeConnect-mqtt"; 21 rev = "v${version}"; 22 sha256 = "sha256-Gj+hXgGkOqKnZ4W2iZ9P6JN3lYMoREMSF/wfGwLL/tc="; 23 }; 24 25 propagatedBuildInputs = [ 26 paho-mqtt 27 python-dateutil 28 weconnect 29 ]; 30 31 postPatch = '' 32 substituteInPlace weconnect_mqtt/__version.py \ 33 --replace "develop" "${version}" 34 substituteInPlace pytest.ini \ 35 --replace "--cov=weconnect_mqtt --cov-config=.coveragerc --cov-report html" "" \ 36 --replace "pytest-cov" "" 37 substituteInPlace requirements.txt \ 38 --replace "weconnect[Images]~=0.35.1" "weconnect" 39 ''; 40 41 checkInputs = [ 42 pytestCheckHook 43 ]; 44 45 pythonImportsCheck = [ 46 "weconnect_mqtt" 47 ]; 48 49 meta = with lib; { 50 description = "Python client that publishes data from Volkswagen WeConnect"; 51 homepage = "https://github.com/tillsteinbach/WeConnect-mqtt"; 52 license = with licenses; [ mit ]; 53 maintainers = with maintainers; [ fab ]; 54 }; 55}