nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 80 lines 1.5 kB view raw
1{ 2 lib, 3 attrs, 4 buildPythonPackage, 5 click, 6 fetchFromGitHub, 7 ldfparser, 8 lxml, 9 openpyxl, 10 pytest-cov-stub, 11 pytest-timeout, 12 pytestCheckHook, 13 pyyaml, 14 setuptools, 15 xlrd, 16 xlwt, 17}: 18 19buildPythonPackage rec { 20 pname = "canmatrix"; 21 version = "1.2"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "ebroecker"; 26 repo = "canmatrix"; 27 tag = version; 28 hash = "sha256-PfegsFha7ernSqnMeaDoLf1jLx1CiOoiYi34dESEgBY="; 29 }; 30 31 build-system = [ setuptools ]; 32 33 dependencies = [ 34 attrs 35 click 36 ]; 37 38 optional-dependencies = { 39 arxml = [ lxml ]; 40 fibex = [ lxml ]; 41 kcd = [ lxml ]; 42 ldf = [ ldfparser ]; 43 odx = [ lxml ]; 44 xls = [ 45 xlrd 46 xlwt 47 ]; 48 xlsx = [ openpyxl ]; 49 yaml = [ pyyaml ]; 50 }; 51 52 nativeCheckInputs = [ 53 pytest-cov-stub 54 pytest-timeout 55 pytestCheckHook 56 ] 57 ++ lib.concatAttrValues optional-dependencies; 58 59 pytestFlags = [ 60 # long_envvar_name_imports requires stable key value pair ordering 61 "-s" 62 ]; 63 64 enabledTestPaths = [ 65 "src/canmatrix" 66 "tests/" 67 ]; 68 69 disabledTests = [ "long_envvar_name_imports" ]; 70 71 pythonImportsCheck = [ "canmatrix" ]; 72 73 meta = { 74 description = "Support and convert several CAN (Controller Area Network) database formats"; 75 homepage = "https://github.com/ebroecker/canmatrix"; 76 changelog = "https://github.com/ebroecker/canmatrix/releases/tag/${version}"; 77 license = lib.licenses.bsd2; 78 maintainers = with lib.maintainers; [ sorki ]; 79 }; 80}