nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 aioresponses,
5 buildPythonPackage,
6 fetchFromGitHub,
7 poetry-core,
8 pytest-asyncio,
9 pytest-cov-stub,
10 pytestCheckHook,
11 syrupy,
12 yarl,
13}:
14
15buildPythonPackage rec {
16 pname = "aiowithings";
17 version = "3.1.6";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "joostlek";
22 repo = "python-withings";
23 tag = "v${version}";
24 hash = "sha256-YC1rUyPXWbJ/xfUus5a7vw44gw7PIAdwhrUstXB/+nI=";
25 };
26
27 build-system = [ poetry-core ];
28
29 dependencies = [
30 aiohttp
31 yarl
32 ];
33
34 nativeCheckInputs = [
35 aioresponses
36 pytest-asyncio
37 pytest-cov-stub
38 pytestCheckHook
39 syrupy
40 ];
41
42 pythonImportsCheck = [ "aiowithings" ];
43
44 pytestFlags = [ "--snapshot-update" ];
45
46 disabledTests = [
47 # Tests require network access
48 "test_creating_own_session"
49 "test_error_codes"
50 "test_get_activities"
51 "test_get_devices"
52 "test_get_goals"
53 "test_get_measurement"
54 "test_get_new_device"
55 "test_get_sleep_summary"
56 "test_get_sleep"
57 "test_get_workouts"
58 "test_list_all_subscriptions"
59 "test_list_subscriptions"
60 "test_putting_in_own_session"
61 "test_revoking"
62 "test_subscribing"
63 "test_timeout"
64 "test_unexpected_server_response"
65 ];
66
67 meta = {
68 description = "Module to interact with Withings";
69 homepage = "https://github.com/joostlek/python-withings";
70 changelog = "https://github.com/joostlek/python-withings/releases/tag/v${version}";
71 license = lib.licenses.mit;
72 maintainers = with lib.maintainers; [ fab ];
73 };
74}