depot/third_party/nixpkgs/pkgs/development/python-modules/samsungtvws/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

69 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
isPy27,
# propagates:
requests,
websocket-client,
# extras: async
aiohttp,
websockets,
# extras: encrypted
cryptography,
py3rijndael,
# tests
aioresponses,
pytest-asyncio,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "samsungtvws";
version = "2.6.0";
format = "setuptools";
disabled = isPy27;
src = fetchFromGitHub {
owner = "xchwarze";
repo = "samsung-tv-ws-api";
rev = "v${version}";
hash = "sha256-mkjfimzu7paz+ZskartL052AfUBtL1xU0eOlrHgD1UE=";
};
propagatedBuildInputs = [
requests
websocket-client
];
passthru.optional-dependencies = {
async = [
aiohttp
websockets
];
encrypted = [
cryptography
py3rijndael
];
};
nativeCheckInputs = [
aioresponses
pytest-asyncio
pytestCheckHook
] ++ passthru.optional-dependencies.async ++ passthru.optional-dependencies.encrypted;
pythonImportsCheck = [ "samsungtvws" ];
meta = with lib; {
description = "Samsung Smart TV WS API wrapper";
homepage = "https://github.com/xchwarze/samsung-tv-ws-api";
changelog = "https://github.com/xchwarze/samsung-tv-ws-api/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}