1{ lib
2, aiohttp
3, beautifulsoup4
4, buildPythonPackage
5, cryptography
6, fetchFromGitHub
7, flit-core
8, lxml
9, pyjwt
10, pythonOlder
11}:
12
13buildPythonPackage rec {
14 pname = "skodaconnect";
15 version = "1.3.8";
16 pyproject = true;
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "lendy007";
22 repo = pname;
23 rev = "refs/tags/${version}";
24 hash = "sha256-Isnji6hXkTuTmbMpSuim9uG5ECSDX6A8QZ13sTCU9t0=";
25 };
26
27 postPatch = ''
28 # https://github.com/skodaconnect/skodaconnect/pull/103
29 substituteInPlace pyproject.toml \
30 --replace "Bug Tracker" '"Bug Tracker"'
31 '';
32
33 nativeBuildInputs = [
34 flit-core
35 ];
36
37 propagatedBuildInputs = [
38 aiohttp
39 beautifulsoup4
40 cryptography
41 lxml
42 pyjwt
43 ];
44
45 # Project has no tests
46 doCheck = false;
47
48 pythonImportsCheck = [
49 "skodaconnect"
50 ];
51
52 meta = with lib; {
53 description = "Python module to communicate with Skoda Connect";
54 homepage = "https://github.com/lendy007/skodaconnect";
55 changelog = "https://github.com/lendy007/skodaconnect/releases/tag/${version}";
56 license = with licenses; [ asl20 ];
57 maintainers = with maintainers; [ fab ];
58 };
59}