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