nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiofiles,
4 aiohttp,
5 aresponses,
6 buildPythonPackage,
7 ciso8601,
8 fetchFromGitHub,
9 pytest-asyncio,
10 pytest-freezegun,
11 pytestCheckHook,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "aioskybell";
17 version = "23.12.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "tkdrob";
22 repo = "aioskybell";
23 tag = version;
24 hash = "sha256-5F0B5z0pJLKJPzKIowE07vEgmNXnDVEeGFbPGnJ6H9I=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace 'version="master",' 'version="${version}",'
30 '';
31
32 nativeBuildInputs = [ setuptools ];
33
34 propagatedBuildInputs = [
35 aiohttp
36 aiofiles
37 ciso8601
38 ];
39
40 nativeCheckInputs = [
41 aresponses
42 pytest-asyncio
43 pytest-freezegun
44 pytestCheckHook
45 ];
46
47 disabledTests = [
48 # aiohttp compat issues
49 "test_get_devices"
50 "test_errors"
51 "test_async_change_setting"
52 ];
53
54 pythonImportsCheck = [ "aioskybell" ];
55
56 meta = {
57 description = "API client for Skybell doorbells";
58 homepage = "https://github.com/tkdrob/aioskybell";
59 license = with lib.licenses; [ mit ];
60 maintainers = with lib.maintainers; [ fab ];
61 };
62}