1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6, pyyaml 7, iso8601 8, requests 9, pycryptodome 10}: 11 12buildPythonPackage rec { 13 pname = "pycarwings2"; 14 version = "2.12"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.5"; 18 19 src = fetchFromGitHub { 20 owner = "filcole"; 21 repo = pname; 22 # release not tagged: https://github.com/filcole/pycarwings2/issues/33 23 rev = "0dc9e7e74cb119614c72c7f955801a366f303c56"; 24 sha256 = "sha256-3lyAgLuaNrCDvRT2yYkgaDiLPKW9Hbg05cQlMIBUs6o="; 25 }; 26 27 propagatedBuildInputs = [ 28 pyyaml 29 iso8601 30 requests 31 pycryptodome 32 ]; 33 34 checkInputs = [ 35 pytestCheckHook 36 ]; 37 38 postPatch = '' 39 substituteInPlace setup.py \ 40 --replace "'pytest-runner'" "" 41 substituteInPlace setup.cfg \ 42 --replace " --flake8 --cov=pycarwings2 --cache-clear --ignore=venv --verbose" "" 43 ''; 44 45 disabledTests = [ 46 # Test requires network access 47 "test_bad_password" 48 ]; 49 50 pythonImportsCheck = [ 51 "pycarwings2" 52 ]; 53 54 meta = with lib; { 55 description = "Python library for interacting with the NissanConnect EV"; 56 homepage = "https://github.com/filcole/pycarwings2"; 57 license = licenses.asl20; 58 maintainers = with maintainers; [ fab ]; 59 }; 60}