1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 appdirs,
8 ecdsa,
9 httpx,
10 ms-cv,
11 pydantic,
12 pytest-asyncio,
13 pytestCheckHook,
14 respx,
15}:
16
17buildPythonPackage rec {
18 pname = "xbox-webapi";
19 version = "2.1.0";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "OpenXbox";
26 repo = "xbox-webapi-python";
27 rev = "v${version}";
28 hash = "sha256-9A3gdSlRjBCx5fBW+jkaSWsFuGieXQKvbEbZzGzLf94=";
29 };
30
31 nativeBuildInputs = [ setuptools ];
32
33 propagatedBuildInputs = [
34 appdirs
35 ecdsa
36 httpx
37 ms-cv
38 pydantic
39 ];
40
41 nativeCheckInputs = [
42 pytest-asyncio
43 pytestCheckHook
44 respx
45 ];
46
47 # https://github.com/OpenXbox/xbox-webapi-python/issues/114
48 disabledTests = [ "test_import" ];
49
50 meta = with lib; {
51 changelog = "https://github.com/OpenXbox/xbox-webapi-python/blob/${src.rev}/CHANGELOG.md";
52 description = "Library to authenticate with Windows Live/Xbox Live and use their API";
53 homepage = "https://github.com/OpenXbox/xbox-webapi-python";
54 license = licenses.mit;
55 maintainers = with maintainers; [ dotlambda ];
56 };
57}