1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 isPy27, 6 7 # propagates: 8 requests, 9 websocket-client, 10 11 # extras: async 12 aiohttp, 13 websockets, 14 15 # extras: encrypted 16 cryptography, 17 py3rijndael, 18 19 # tests 20 aioresponses, 21 pytest-asyncio, 22 pytestCheckHook, 23}: 24 25buildPythonPackage rec { 26 pname = "samsungtvws"; 27 version = "2.6.0"; 28 format = "setuptools"; 29 disabled = isPy27; 30 31 src = fetchFromGitHub { 32 owner = "xchwarze"; 33 repo = "samsung-tv-ws-api"; 34 rev = "v${version}"; 35 hash = "sha256-mkjfimzu7paz+ZskartL052AfUBtL1xU0eOlrHgD1UE="; 36 }; 37 38 propagatedBuildInputs = [ 39 requests 40 websocket-client 41 ]; 42 43 passthru.optional-dependencies = { 44 async = [ 45 aiohttp 46 websockets 47 ]; 48 encrypted = [ 49 cryptography 50 py3rijndael 51 ]; 52 }; 53 54 nativeCheckInputs = [ 55 aioresponses 56 pytest-asyncio 57 pytestCheckHook 58 ] ++ passthru.optional-dependencies.async ++ passthru.optional-dependencies.encrypted; 59 60 pythonImportsCheck = [ "samsungtvws" ]; 61 62 meta = with lib; { 63 description = "Samsung Smart TV WS API wrapper"; 64 homepage = "https://github.com/xchwarze/samsung-tv-ws-api"; 65 changelog = "https://github.com/xchwarze/samsung-tv-ws-api/releases/tag/v${version}"; 66 license = licenses.mit; 67 maintainers = with maintainers; [ hexa ]; 68 }; 69}