nixpkgs/pkgs/applications/networking/flent/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.1 KiB
Nix
Raw Normal View History

{
lib,
buildPythonApplication,
fetchPypi,
procps,
python,
qt5,
xvfb-run,
}:
2018-05-14 17:24:18 +02:00
buildPythonApplication rec {
pname = "flent";
version = "2.1.1";
2019-08-08 14:51:44 +02:00
src = fetchPypi {
inherit pname version;
sha256 = "sha256-21gd6sPYCZll3Q2O7kucTRhXvc5byXeQr50+1bZVT3M=";
2018-05-14 17:24:18 +02:00
};
buildInputs = [python.pkgs.sphinx];
nativeBuildInputs = [qt5.wrapQtAppsHook];
propagatedBuildInputs = [
procps
python.pkgs.matplotlib
python.pkgs.pyqt5
python.pkgs.qtpy
];
nativeCheckInputs = [
python.pkgs.mock
xvfb-run
];
2018-06-07 06:44:51 +02:00
2019-08-08 15:03:41 +02:00
checkPhase = ''
# 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
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
2019-08-08 14:57:04 +02: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;
maintainers = [maintainers.mmlb];
2018-05-14 17:24:18 +02:00
};
}