Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / bimmer-connected / default.nix
blob470eaf376a77112b3b12124a9525f646b077aea5
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , pbr
6 , httpx
7 , pillow
8 , pycryptodome
9 , pyjwt
10 , pytest-asyncio
11 , pytestCheckHook
12 , python
13 , respx
14 , time-machine
15 , tzdata
18 buildPythonPackage rec {
19   pname = "bimmer-connected";
20   version = "0.14.2";
21   format = "setuptools";
23   disabled = pythonOlder "3.6";
25   src = fetchFromGitHub {
26     owner = "bimmerconnected";
27     repo = "bimmer_connected";
28     rev = "refs/tags/${version}";
29     hash = "sha256-69H0hB+yVmyzJ5A2Cb7ZcaaoRzMt618U+TUHYQ03/cY=";
30   };
32   nativeBuildInputs = [
33     pbr
34   ];
36   PBR_VERSION = version;
38   propagatedBuildInputs = [
39     httpx
40     pillow
41     pycryptodome
42     pyjwt
43   ];
45   postInstall = ''
46     cp -R bimmer_connected/tests/responses $out/${python.sitePackages}/bimmer_connected/tests/
47   '';
49   nativeCheckInputs = [
50     pytest-asyncio
51     pytestCheckHook
52     respx
53     time-machine
54   ];
56   preCheck = ''
57     export TZDIR=${tzdata}/${python.sitePackages}/tzdata/zoneinfo
58   '';
60   pythonImportsCheck = [
61     "bimmer_connected"
62   ];
64   meta = with lib; {
65     changelog = "https://github.com/bimmerconnected/bimmer_connected/releases/tag/${version}";
66     description = "Library to read data from the BMW Connected Drive portal";
67     homepage = "https://github.com/bimmerconnected/bimmer_connected";
68     license = licenses.asl20;
69     maintainers = with maintainers; [ dotlambda ];
70   };