Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, attrs 6, bitstruct 7, click 8, future 9, pathlib2 10, typing 11, lxml 12, xlwt 13, xlrd 14, XlsxWriter 15, pyyaml 16, pytest 17}: 18 19buildPythonPackage rec { 20 pname = "canmatrix"; 21 version = "0.9.1"; 22 23 # uses fetchFromGitHub as PyPi release misses test/ dir 24 src = fetchFromGitHub { 25 owner = "ebroecker"; 26 repo = pname; 27 rev = version; 28 sha256 = "129lcchq45h8wqjvvn0rwpbmih4m0igass2cx7a21z94li97hcia"; 29 }; 30 31 propagatedBuildInputs = [ 32 # required 33 attrs 34 bitstruct 35 click 36 future 37 pathlib2 38 # optional 39 lxml 40 xlwt 41 xlrd 42 XlsxWriter 43 pyyaml 44 ] ++ lib.optional (pythonOlder "3.5") typing; 45 46 postPatch = '' 47 substituteInPlace setup.py \ 48 --replace "version = versioneer.get_version()" "version = \"${version}\"" 49 ''; 50 51 checkInputs = [ 52 pytest 53 ]; 54 55 # long_envvar_name_imports requires stable key value pair ordering 56 checkPhase = '' 57 pytest -s src/canmatrix -k 'not long_envvar_name_imports' 58 ''; 59 60 meta = with lib; { 61 homepage = "https://github.com/ebroecker/canmatrix"; 62 description = "Support and convert several CAN (Controller Area Network) database formats .arxml .dbc .dbf .kcd .sym fibex xls(x)"; 63 license = licenses.bsd2; 64 maintainers = with maintainers; [ sorki ]; 65 }; 66} 67