depot/third_party/nixpkgs/pkgs/development/python-modules/canmatrix/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

59 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, attrs
, bitstruct
, future
, pathlib2
, typing
, lxml
, xlwt
, xlrd
, XlsxWriter
, pyyaml
, pytest
}:
buildPythonPackage rec {
pname = "canmatrix";
version = "0.8";
# uses fetchFromGitHub as PyPi release misses test/ dir
src = fetchFromGitHub {
owner = "ebroecker";
repo = pname;
rev = version;
sha256 = "1wzflapyj2j4xsi7d7gfmznmxbgr658n092xyq9nac46rbhpcphg";
};
propagatedBuildInputs = [
# required
attrs
bitstruct
future
pathlib2
# optional
lxml
xlwt
xlrd
XlsxWriter
pyyaml
] ++ lib.optional (pythonOlder "3.5") typing;
checkInputs = [
pytest
];
checkPhase = ''
pytest -s src/canmatrix
'';
meta = with lib; {
homepage = "https://github.com/ebroecker/canmatrix";
description = "Support and convert several CAN (Controller Area Network) database formats .arxml .dbc .dbf .kcd .sym fibex xls(x)";
license = licenses.bsd2;
maintainers = with maintainers; [ sorki ];
};
}