mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-19 06:20:25 +08:00
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
85 lines
1.5 KiB
Nix
85 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
aiohttp,
|
|
asyncclick,
|
|
buildPythonPackage,
|
|
cryptography,
|
|
fetchFromGitHub,
|
|
hatchling,
|
|
kasa-crypt,
|
|
mashumaro,
|
|
orjson,
|
|
ptpython,
|
|
pytest-asyncio,
|
|
pytest-freezer,
|
|
pytest-mock,
|
|
pytest-socket,
|
|
pytest-xdist,
|
|
pytestCheckHook,
|
|
rich,
|
|
voluptuous,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "python-kasa";
|
|
version = "0.10.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "python-kasa";
|
|
repo = "python-kasa";
|
|
tag = version;
|
|
hash = "sha256-OIkqNGTnIPoHYrE5NhAxSsRCTyMGvNADvIg28EuKsEw=";
|
|
};
|
|
|
|
build-system = [ hatchling ];
|
|
|
|
dependencies = [
|
|
aiohttp
|
|
asyncclick
|
|
cryptography
|
|
mashumaro
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-asyncio
|
|
pytest-freezer
|
|
pytest-mock
|
|
pytest-socket
|
|
pytest-xdist
|
|
pytestCheckHook
|
|
voluptuous
|
|
];
|
|
|
|
optional-dependencies = {
|
|
shell = [
|
|
ptpython
|
|
rich
|
|
];
|
|
speedups = [
|
|
kasa-crypt
|
|
orjson
|
|
];
|
|
};
|
|
|
|
pytestFlags = [ "--asyncio-mode=auto" ];
|
|
|
|
disabledTestPaths = [
|
|
# Skip the examples tests
|
|
"tests/test_readme_examples.py"
|
|
# Failing on hydra
|
|
"tests/test_cli.py"
|
|
];
|
|
|
|
pythonImportsCheck = [ "kasa" ];
|
|
|
|
meta = {
|
|
description = "Python API for TP-Link Kasa Smarthome products";
|
|
homepage = "https://python-kasa.readthedocs.io/";
|
|
changelog = "https://github.com/python-kasa/python-kasa/blob/${src.tag}/CHANGELOG.md";
|
|
license = lib.licenses.gpl3Plus;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
mainProgram = "kasa";
|
|
};
|
|
}
|