1{ buildPythonPackage, fetchPypi, isPy27, lib, setuptools, simpy, tkinter 2# GUI-based visualization of the simulation is optional 3, enableVisualization ? true }: 4 5buildPythonPackage rec { 6 pname = "wsnsimpy"; 7 version = "0.2.5"; 8 disabled = isPy27; 9 10 src = fetchPypi { 11 inherit pname version; 12 sha256 = "1b7fdqwc2v9alfwf2fr0aqr8rf2pb5lpm4anpilmvrh2lhjar4i2"; 13 }; 14 15 propagatedBuildInputs = [ setuptools simpy ] 16 ++ lib.optional enableVisualization tkinter; 17 18 # No test cases are included, thus unittest tries to run the examples, which 19 # fail because no DISPLAYs are available. 20 doCheck = false; 21 22 pythonImportsCheck = [ "wsnsimpy" ] 23 ++ lib.optional enableVisualization "wsnsimpy.wsnsimpy_tk"; 24 25 meta = with lib; { 26 description = "SimPy-based WSN Simulator"; 27 homepage = "https://pypi.org/project/wsnsimpy/"; 28 license = licenses.bsd2; 29 maintainers = with maintainers; [ dmrauh ]; 30 }; 31}