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