2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy27
|
|
|
|
|
|
|
|
# propagates:
|
2020-09-25 04:45:31 +00:00
|
|
|
, requests
|
2021-06-28 23:13:55 +00:00
|
|
|
, websocket-client
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
# extras: async
|
|
|
|
, aiohttp
|
|
|
|
, websockets
|
|
|
|
|
|
|
|
# extras: encrypted
|
|
|
|
, cryptography
|
|
|
|
, py3rijndael
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, aioresponses
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "samsungtvws";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "2.6.0";
|
2022-04-15 01:41:22 +00:00
|
|
|
format = "setuptools";
|
2020-09-25 04:45:31 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xchwarze";
|
|
|
|
repo = "samsung-tv-ws-api";
|
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-mkjfimzu7paz+ZskartL052AfUBtL1xU0eOlrHgD1UE=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
2022-04-15 01:41:22 +00:00
|
|
|
websocket-client
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
2022-04-15 01:41:22 +00:00
|
|
|
async = [
|
|
|
|
aiohttp
|
|
|
|
websockets
|
|
|
|
];
|
|
|
|
encrypted = [
|
|
|
|
cryptography
|
|
|
|
py3rijndael
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-15 01:41:22 +00:00
|
|
|
aioresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
]
|
2022-06-16 17:23:12 +00:00
|
|
|
++ passthru.optional-dependencies.async
|
|
|
|
++ passthru.optional-dependencies.encrypted;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "samsungtvws" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Samsung Smart TV WS API wrapper";
|
|
|
|
homepage = "https://github.com/xchwarze/samsung-tv-ws-api";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/xchwarze/samsung-tv-ws-api/releases/tag/v${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|