1{
2 lib,
3 aiohttp,
4 aioresponses,
5 buildPythonPackage,
6 fetchFromGitHub,
7 habitipy,
8 hatch-regex-commit,
9 hatchling,
10 mashumaro,
11 orjson,
12 pillow,
13 pytest-asyncio,
14 pytest-cov-stub,
15 pytestCheckHook,
16 pythonOlder,
17 syrupy,
18}:
19
20buildPythonPackage rec {
21 pname = "habiticalib";
22 version = "0.4.5";
23 pyproject = true;
24
25 disabled = pythonOlder "3.12";
26
27 src = fetchFromGitHub {
28 owner = "tr4nt0r";
29 repo = "habiticalib";
30 tag = "v${version}";
31 hash = "sha256-9IMC4MkL5hRCDjeuSuLBcn986LmO/zz32NV0RGTEf1M=";
32 };
33
34 build-system = [
35 hatch-regex-commit
36 hatchling
37 ];
38
39 dependencies = [
40 aiohttp
41 habitipy
42 mashumaro
43 orjson
44 pillow
45 ];
46
47 nativeCheckInputs = [
48 aioresponses
49 pytest-asyncio
50 pytest-cov-stub
51 pytestCheckHook
52 syrupy
53 ];
54
55 pytestFlags = [ "--snapshot-update" ];
56
57 pythonImportsCheck = [ "habiticalib" ];
58
59 disabledTests = [
60 # AssertionError
61 "test_generate_avatar"
62 ];
63
64 meta = {
65 description = "Library for the Habitica API";
66 homepage = "https://github.com/tr4nt0r/habiticalib";
67 changelog = "https://github.com/tr4nt0r/habiticalib/releases/tag/${src.tag}";
68 license = lib.licenses.mit;
69 maintainers = with lib.maintainers; [ fab ];
70 };
71}