1{
2 lib,
3 aiohttp,
4 aioresponses,
5 buildPythonPackage,
6 fetchFromGitHub,
7 poetry-core,
8 pytest-asyncio,
9 pytestCheckHook,
10 pythonOlder,
11 syrupy,
12 yarl,
13}:
14
15buildPythonPackage rec {
16 pname = "aiowithings";
17 version = "2.1.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.11";
21
22 src = fetchFromGitHub {
23 owner = "joostlek";
24 repo = "python-withings";
25 rev = "refs/tags/v${version}";
26 hash = "sha256-+pIIVCR+QsW9M3pH9Ss3dMvkeKM1OdhQ1y+s/T6pHtk=";
27 };
28
29 postPatch = ''
30 substituteInPlace pyproject.toml \
31 --replace "--cov" ""
32 '';
33
34 nativeBuildInputs = [ poetry-core ];
35
36 propagatedBuildInputs = [
37 aiohttp
38 yarl
39 ];
40
41 nativeCheckInputs = [
42 aioresponses
43 pytest-asyncio
44 pytestCheckHook
45 syrupy
46 ];
47
48 pythonImportsCheck = [ "aiowithings" ];
49
50 meta = with lib; {
51 description = "Module to interact with Withings";
52 homepage = "https://github.com/joostlek/python-withings";
53 changelog = "https://github.com/joostlek/python-withings/releases/tag/v${version}";
54 license = licenses.mit;
55 maintainers = with maintainers; [ fab ];
56 };
57}