at 22.05-pre 806 B view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, aenum 6, wrapt 7, typing ? null 8, pyserial 9, nose 10, mock 11, hypothesis 12, future 13, pytest 14 }: 15 16buildPythonPackage rec { 17 pname = "python-can"; 18 version = "3.3.4"; 19 20 src = fetchPypi { 21 inherit pname version; 22 sha256 = "2d3c223b7adc4dd46ce258d4a33b7e0dbb6c339e002faa40ee4a69d5fdce9449"; 23 }; 24 25 propagatedBuildInputs = [ wrapt pyserial aenum ] ++ lib.optional (pythonOlder "3.5") typing; 26 checkInputs = [ nose mock pytest hypothesis future ]; 27 28 # Add the scripts to PATH 29 checkPhase = '' 30 PATH=$out/bin:$PATH pytest -c /dev/null 31 ''; 32 33 meta = with lib; { 34 homepage = "https://github.com/hardbyte/python-can"; 35 description = "CAN support for Python"; 36 license = licenses.lgpl3; 37 maintainers = with maintainers; [ sorki ]; 38 }; 39}