depot/third_party/nixpkgs/pkgs/development/python-modules/pycarwings2/default.nix
Default email a425ba4985 Project import generated by Copybara.
GitOrigin-RevId: 5b091d4fbe3b7b7493c3b46fe0842e4b30ea24b3
2021-12-30 14:39:12 +01:00

59 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, pyyaml
, iso8601
, requests
, pycryptodome
}:
buildPythonPackage rec {
pname = "pycarwings2";
version = "2.13";
format = "setuptools";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "filcole";
repo = pname;
rev = "v${version}";
sha256 = "04k1la7wix6sp668nqpwdhd3057b2bzcz7h2b9a57cxlifl8pjxf";
};
propagatedBuildInputs = [
pyyaml
iso8601
requests
pycryptodome
];
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner'" ""
substituteInPlace setup.cfg \
--replace " --flake8 --cov=pycarwings2 --cache-clear --ignore=venv --verbose" ""
'';
disabledTests = [
# Test requires network access
"test_bad_password"
];
pythonImportsCheck = [
"pycarwings2"
];
meta = with lib; {
description = "Python library for interacting with the NissanConnect EV";
homepage = "https://github.com/filcole/pycarwings2";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}