2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
isPy27,
|
|
|
|
lib,
|
|
|
|
setuptools,
|
|
|
|
simpy,
|
|
|
|
tkinter,
|
|
|
|
# GUI-based visualization of the simulation is optional
|
|
|
|
enableVisualization ? true,
|
|
|
|
}:
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wsnsimpy";
|
|
|
|
version = "0.2.5";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-12-25 13:55:36 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "1b7fdqwc2v9alfwf2fr0aqr8rf2pb5lpm4anpilmvrh2lhjar4i2";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
simpy
|
|
|
|
] ++ lib.optional enableVisualization tkinter;
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
# No test cases are included, thus unittest tries to run the examples, which
|
|
|
|
# fail because no DISPLAYs are available.
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "wsnsimpy" ] ++ lib.optional enableVisualization "wsnsimpy.wsnsimpy_tk";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "SimPy-based WSN Simulator";
|
|
|
|
homepage = "https://pypi.org/project/wsnsimpy/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ dmrauh ];
|
|
|
|
};
|
|
|
|
}
|