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.6.1";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "G-Two";
22 repo = pname;
23 rev = "v${version}";
24 hash = "sha256-esZ+nIHIXKfilb8dBFbAbQQFI6fFRUcoFVCPdnqGXYw=";
25 };
26
27 propagatedBuildInputs = [
28 aiohttp
29 stdiomask
30 ];
31
32 checkInputs = [
33 asynctest
34 cryptography
35 pytest-asyncio
36 pytestCheckHook
37 ];
38
39 postPatch = ''
40 substituteInPlace setup.cfg \
41 --replace "--cov=subarulink" ""
42 '';
43
44 __darwinAllowLocalNetworking = true;
45
46 preCheck = ''
47 export HOME=$(mktemp -d)
48 '';
49
50 pythonImportsCheck = [
51 "subarulink"
52 ];
53
54 meta = with lib; {
55 description = "Python module for interacting with STARLINK-enabled vehicle";
56 homepage = "https://github.com/G-Two/subarulink";
57 license = with licenses; [ asl20 ];
58 maintainers = with maintainers; [ fab ];
59 };
60}