Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 59 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 paho-mqtt_2, 6 pytestCheckHook, 7 python-dateutil, 8 pythonOlder, 9 setuptools, 10 weconnect, 11}: 12 13buildPythonPackage rec { 14 pname = "weconnect-mqtt"; 15 version = "0.49.2"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 owner = "tillsteinbach"; 22 repo = "WeConnect-mqtt"; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-jTScDPTj7aIQcGuL2g8MvuYln6iaj6abEyCfd8vvT2I="; 25 }; 26 27 postPatch = '' 28 substituteInPlace weconnect_mqtt/__version.py \ 29 --replace-fail "0.0.0dev" "${version}" 30 substituteInPlace requirements.txt \ 31 --replace-fail "weconnect[Images]~=" "weconnect>=" 32 substituteInPlace pytest.ini \ 33 --replace-fail "--cov=weconnect_mqtt --cov-config=.coveragerc --cov-report html" "" \ 34 --replace-fail "pytest-cov" "" 35 ''; 36 37 pythonRelaxDeps = [ "python-dateutil" ]; 38 39 build-system = [ setuptools ]; 40 41 dependencies = [ 42 paho-mqtt_2 43 python-dateutil 44 weconnect 45 ] ++ weconnect.optional-dependencies.Images; 46 47 nativeCheckInputs = [ pytestCheckHook ]; 48 49 pythonImportsCheck = [ "weconnect_mqtt" ]; 50 51 meta = { 52 description = "Python client that publishes data from Volkswagen WeConnect"; 53 homepage = "https://github.com/tillsteinbach/WeConnect-mqtt"; 54 changelog = "https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/v${version}"; 55 license = with lib.licenses; [ mit ]; 56 maintainers = with lib.maintainers; [ fab ]; 57 mainProgram = "weconnect-mqtt"; 58 }; 59}