1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytest-mock 5, pytestCheckHook 6, pythonOlder 7, requests 8, websocket-client 9, zeroconf 10}: 11 12buildPythonPackage rec { 13 pname = "devolo-home-control-api"; 14 version = "0.17.4"; 15 disabled = pythonOlder "3.6"; 16 17 src = fetchFromGitHub { 18 owner = "2Fake"; 19 repo = "devolo_home_control_api"; 20 rev = "v${version}"; 21 sha256 = "sha256-N/48Q2IEL194vCzrPPuy+mRNejXfkoXy2t2oe0Y6ug4="; 22 }; 23 24 propagatedBuildInputs = [ 25 requests 26 zeroconf 27 websocket-client 28 ]; 29 30 checkInputs = [ 31 pytestCheckHook 32 pytest-mock 33 ]; 34 35 postPatch = '' 36 # setup.py is not able to detect the version with setuptools_scm 37 substituteInPlace setup.py \ 38 --replace "setuptools_scm" "" \ 39 --replace 'use_scm_version=True' 'use_scm_version="${version}"' 40 ''; 41 42 # Disable test that requires network access 43 disabledTests = [ 44 "test__on_pong" 45 "TestMprm" 46 ]; 47 48 pythonImportsCheck = [ "devolo_home_control_api" ]; 49 50 meta = with lib; { 51 description = "Python library to work with devolo Home Control"; 52 homepage = "https://github.com/2Fake/devolo_home_control_api"; 53 license = with licenses; [ gpl3Only ]; 54 maintainers = with maintainers; [ fab ]; 55 }; 56}