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