1{
2 lib,
3 aiohttp,
4 aresponses,
5 buildPythonPackage,
6 certifi,
7 fetchFromGitHub,
8 poetry-core,
9 pytest-aiohttp,
10 pytest-asyncio,
11 pytestCheckHook,
12 pythonOlder,
13 yarl,
14}:
15
16buildPythonPackage rec {
17 pname = "pytile";
18 version = "2024.12.0";
19 format = "pyproject";
20
21 disabled = pythonOlder "3.10";
22
23 src = fetchFromGitHub {
24 owner = "bachya";
25 repo = "pytile";
26 tag = version;
27 hash = "sha256-6vcFGMj7E1xw01yHOq/WDpqMxd7OIiRBCmw5LForAR0=";
28 };
29
30 nativeBuildInputs = [ poetry-core ];
31
32 propagatedBuildInputs = [
33 aiohttp
34 certifi
35 yarl
36 ];
37
38 nativeCheckInputs = [
39 aresponses
40 pytest-aiohttp
41 pytest-asyncio
42 pytestCheckHook
43 ];
44
45 disabledTestPaths = [
46 # Ignore the examples as they are prefixed with test_
47 "examples/"
48 ];
49
50 pythonImportsCheck = [ "pytile" ];
51
52 __darwinAllowLocalNetworking = true;
53
54 meta = with lib; {
55 description = "Python API for Tile Bluetooth trackers";
56 longDescription = ''
57 pytile is a simple Python library for retrieving information on Tile
58 Bluetooth trackers (including last location and more).
59 '';
60 homepage = "https://github.com/bachya/pytile";
61 changelog = "https://github.com/bachya/pytile/releases/tag/${version}";
62 license = with licenses; [ mit ];
63 maintainers = with maintainers; [ fab ];
64 };
65}