2022-11-04 12:27:35 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonApplication,
|
|
|
|
fetchPypi,
|
|
|
|
procps,
|
|
|
|
python,
|
|
|
|
qt5,
|
|
|
|
xvfb-run,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "flent";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "2.1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-21gd6sPYCZll3Q2O7kucTRhXvc5byXeQr50+1bZVT3M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
buildInputs = [python.pkgs.sphinx];
|
|
|
|
nativeBuildInputs = [qt5.wrapQtAppsHook];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
procps
|
|
|
|
python.pkgs.matplotlib
|
|
|
|
python.pkgs.pyqt5
|
|
|
|
python.pkgs.qtpy
|
|
|
|
];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-04 12:27:35 +00:00
|
|
|
python.pkgs.mock
|
|
|
|
xvfb-run
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2022-11-04 12:27:35 +00:00
|
|
|
# we want the gui tests to always run
|
|
|
|
sed -i 's|self.skip|pass; #&|' unittests/test_gui.py
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
cat >test-runner <<EOF
|
|
|
|
#!/bin/sh
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.interpreter} nix_run_setup test
|
2020-04-24 23:36:52 +00:00
|
|
|
EOF
|
|
|
|
chmod +x test-runner
|
|
|
|
wrapQtApp test-runner --prefix PYTHONPATH : $PYTHONPATH
|
|
|
|
xvfb-run -s '-screen 0 800x600x24' ./test-runner
|
|
|
|
'';
|
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "FLExible Network Tester";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://flent.org";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
maintainers = [maintainers.mmlb];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|