2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, buildPythonApplication, fetchPypi, matplotlib, procps, pyqt5, python
|
2019-08-08 13:03:41 +00:00
|
|
|
, pythonPackages, qt5, sphinx, xvfb_run }:
|
2018-05-14 15:24:18 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "flent";
|
2019-12-08 06:05:51 +00:00
|
|
|
version = "1.3.2";
|
2019-08-08 12:51:44 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-12-08 06:05:51 +00:00
|
|
|
sha256 = "1k265xxxjld6q38m9lsgy7p0j70qp9a49vh9zg0njbi4i21lxq23";
|
2018-05-14 15:24:18 +00:00
|
|
|
};
|
|
|
|
|
2018-06-07 04:44:51 +00:00
|
|
|
buildInputs = [ sphinx ];
|
2019-08-08 12:57:04 +00:00
|
|
|
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
2019-08-08 13:03:41 +00:00
|
|
|
propagatedBuildInputs = [ matplotlib procps pyqt5 ];
|
|
|
|
checkInputs = [ procps pythonPackages.mock pyqt5 xvfb_run ];
|
2018-06-07 04:44:51 +00:00
|
|
|
|
2019-08-08 13:03:41 +00:00
|
|
|
checkPhase = ''
|
|
|
|
cat >test-runner <<EOF
|
|
|
|
#!/bin/sh
|
2019-04-28 15:52:48 +00:00
|
|
|
|
2019-08-08 13:03:41 +00:00
|
|
|
${python.pythonForBuild.interpreter} nix_run_setup test
|
|
|
|
EOF
|
|
|
|
chmod +x test-runner
|
|
|
|
wrapQtApp test-runner --prefix PYTHONPATH : $PYTHONPATH
|
|
|
|
xvfb-run -s '-screen 0 800x600x24' ./test-runner
|
|
|
|
'';
|
2018-05-14 15:24:18 +00:00
|
|
|
|
2020-10-08 12:05:02 +00:00
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
2019-08-08 12:57:04 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-05-14 15:24:18 +00:00
|
|
|
description = "The FLExible Network Tester";
|
2019-08-08 12:45:52 +00:00
|
|
|
homepage = "https://flent.org";
|
2018-05-14 15:24:18 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
|
|
|
|
maintainers = [ maintainers.mmlb ];
|
|
|
|
};
|
|
|
|
}
|