nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 dnspython,
6 fetchFromGitHub,
7 pytest-asyncio_0,
8 pytestCheckHook,
9 pythonAtLeast,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "pykaleidescape";
15 version = "2022.2.3";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "SteveEasley";
20 repo = "pykaleidescape";
21 tag = "v${version}";
22 hash = "sha256-h5G7wV4Z+sf8Qq4GNFsp8DVDSgQgS0dLGf+DzK/egYM=";
23 };
24
25 nativeBuildInputs = [ setuptools ];
26
27 propagatedBuildInputs = [
28 aiohttp
29 dnspython
30 ];
31
32 nativeCheckInputs = [
33 pytest-asyncio_0
34 pytestCheckHook
35 ];
36
37 pythonImportsCheck = [ "kaleidescape" ];
38
39 disabledTests = [
40 # Test requires network access
41 "test_resolve_succeeds"
42 ]
43 ++ lib.optionals (pythonAtLeast "3.12") [
44 # stuck in EpollSelector.poll()
45 "test_manual_disconnect"
46 "test_concurrency"
47 ];
48
49 meta = {
50 description = "Module for controlling Kaleidescape devices";
51 homepage = "https://github.com/SteveEasley/pykaleidescape";
52 changelog = "https://github.com/SteveEasley/pykaleidescape/releases/tag/${src.tag}";
53 license = lib.licenses.mit;
54 maintainers = with lib.maintainers; [ fab ];
55 };
56}