1{ lib
2, aiohttp
3, asynctest
4, buildPythonPackage
5, cryptography
6, fetchFromGitHub
7, pytest-asyncio
8, pytestCheckHook
9, pythonOlder
10, stdiomask
11}:
12
13buildPythonPackage rec {
14 pname = "subarulink";
15 version = "0.3.15";
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "G-Two";
20 repo = pname;
21 rev = "v${version}";
22 sha256 = "sha256-akDccWkiFwTwq7dvUxm34BFNS5PnQowqnxVvkPFzxLM=";
23 };
24
25 propagatedBuildInputs = [
26 aiohttp
27 stdiomask
28 ];
29
30 checkInputs = [
31 asynctest
32 cryptography
33 pytest-asyncio
34 pytestCheckHook
35 ];
36
37 postPatch = ''
38 substituteInPlace setup.cfg --replace "--cov=subarulink" ""
39 '';
40
41 __darwinAllowLocalNetworking = true;
42
43 preCheck = ''
44 export HOME=$(mktemp -d)
45 '';
46
47 pythonImportsCheck = [ "subarulink" ];
48
49 meta = with lib; {
50 description = "Python module for interacting with STARLINK-enabled vehicle";
51 homepage = "https://github.com/G-Two/subarulink";
52 license = with licenses; [ asl20 ];
53 maintainers = with maintainers; [ fab ];
54 };
55}