2022-11-02 13:59:13 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonApplication,
|
|
|
|
fetchPypi,
|
|
|
|
procps,
|
|
|
|
python,
|
|
|
|
qt5,
|
|
|
|
xvfb-run,
|
|
|
|
}:
|
2018-05-14 17:24:18 +02:00
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "flent";
|
2022-11-02 13:59:13 +01:00
|
|
|
version = "2.1.1";
|
2019-08-08 14:51:44 +02:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-11-02 13:59:13 +01:00
|
|
|
sha256 = "sha256-21gd6sPYCZll3Q2O7kucTRhXvc5byXeQr50+1bZVT3M=";
|
2018-05-14 17:24:18 +02:00
|
|
|
};
|
|
|
|
|
2022-11-02 13:59:13 +01:00
|
|
|
buildInputs = [python.pkgs.sphinx];
|
|
|
|
nativeBuildInputs = [qt5.wrapQtAppsHook];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
procps
|
|
|
|
python.pkgs.matplotlib
|
|
|
|
python.pkgs.pyqt5
|
|
|
|
python.pkgs.qtpy
|
|
|
|
];
|
2023-01-21 13:00:00 +01:00
|
|
|
nativeCheckInputs = [
|
2022-11-02 13:59:13 +01:00
|
|
|
python.pkgs.mock
|
|
|
|
xvfb-run
|
|
|
|
];
|
2018-06-07 06:44:51 +02:00
|
|
|
|
2019-08-08 15:03:41 +02:00
|
|
|
checkPhase = ''
|
2022-11-02 13:59:13 +01:00
|
|
|
# we want the gui tests to always run
|
|
|
|
sed -i 's|self.skip|pass; #&|' unittests/test_gui.py
|
|
|
|
|
2019-08-08 15:03:41 +02:00
|
|
|
cat >test-runner <<EOF
|
|
|
|
#!/bin/sh
|
|
|
|
${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 17:24:18 +02:00
|
|
|
|
2020-10-08 14:05:02 +02:00
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
2019-08-08 14:57:04 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-05-14 17:24:18 +02:00
|
|
|
description = "The FLExible Network Tester";
|
2019-08-08 14:45:52 +02:00
|
|
|
homepage = "https://flent.org";
|
2018-05-14 17:24:18 +02:00
|
|
|
license = licenses.gpl3;
|
|
|
|
|
2022-11-02 13:59:13 +01:00
|
|
|
maintainers = [maintainers.mmlb];
|
2018-05-14 17:24:18 +02:00
|
|
|
};
|
|
|
|
}
|