nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, asyncclick
3, buildPythonPackage
4, fetchFromGitHub
5, importlib-metadata
6, pydantic
7, poetry-core
8, pytest-asyncio
9, pytest-mock
10, pytestCheckHook
11, pythonOlder
12, voluptuous
13}:
14
15buildPythonPackage rec {
16 pname = "python-kasa";
17 version = "0.5.0";
18 format = "pyproject";
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = pname;
24 repo = pname;
25 rev = "refs/tags/${version}";
26 sha256 = "sha256-9zCUYB+TYgDMoTHpR0u42Usq2EKp8vtzlTgU82eXxl8=";
27 };
28
29 nativeBuildInputs = [
30 poetry-core
31 ];
32
33 propagatedBuildInputs = [
34 asyncclick
35 importlib-metadata
36 pydantic
37 ];
38
39 checkInputs = [
40 pytest-asyncio
41 pytest-mock
42 pytestCheckHook
43 voluptuous
44 ];
45
46 disabledTestPaths = [
47 # Skip the examples tests
48 "kasa/tests/test_readme_examples.py"
49 ];
50
51 pythonImportsCheck = [
52 "kasa"
53 ];
54
55 meta = with lib; {
56 description = "Python API for TP-Link Kasa Smarthome products";
57 homepage = "https://python-kasa.readthedocs.io/";
58 license = licenses.gpl3Plus;
59 maintainers = with maintainers; [ fab ];
60 };
61}