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

42 lines
1.1 KiB
Nix
Raw Normal View History

2019-08-08 15:03:41 +02:00
{ stdenv, buildPythonApplication, fetchPypi, matplotlib, procps, pyqt5, python
, pythonPackages, qt5, sphinx, xvfb_run }:
2018-05-14 17:24:18 +02:00
buildPythonApplication rec {
pname = "flent";
2019-08-08 15:03:41 +02:00
version = "1.3.0";
2019-08-08 14:51:44 +02:00
src = fetchPypi {
inherit pname version;
2019-08-08 15:03:41 +02:00
sha256 = "099779i0ghjd9ikq77z6m6scnlmk946lw9issrgz8zm7babiw4d7";
2018-05-14 17:24:18 +02:00
};
2018-06-07 06:44:51 +02:00
buildInputs = [ sphinx ];
2019-08-08 14:57:04 +02:00
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
2019-08-08 15:03:41 +02:00
propagatedBuildInputs = [ matplotlib procps pyqt5 ];
checkInputs = [ procps pythonPackages.mock pyqt5 xvfb_run ];
2018-06-07 06:44:51 +02:00
2019-08-08 15:03:41 +02:00
checkPhase = ''
cat >test-runner <<EOF
#!/bin/sh
2019-08-08 15:03:41 +02: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 17:24:18 +02:00
2019-08-08 14:57:04 +02:00
postInstall = ''
for program in $out/bin/*; do
wrapQtApp $program --prefix PYTHONPATH : $PYTHONPATH
done
'';
2018-05-14 17:24:18 +02:00
meta = with stdenv.lib; {
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 ];
};
}