depot/third_party/nixpkgs/pkgs/applications/networking/flent/default.nix
Default email ae91cbe6cc Project import generated by Copybara.
GitOrigin-RevId: 536fe36e23ab0fc8b7f35c24603422eee9fc17a2
2021-02-05 18:12:51 +01:00

39 lines
1 KiB
Nix

{ lib, buildPythonApplication, fetchPypi, matplotlib, procps, pyqt5, python
, pythonPackages, qt5, sphinx, xvfb_run }:
buildPythonApplication rec {
pname = "flent";
version = "1.3.2";
src = fetchPypi {
inherit pname version;
sha256 = "1k265xxxjld6q38m9lsgy7p0j70qp9a49vh9zg0njbi4i21lxq23";
};
buildInputs = [ sphinx ];
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
propagatedBuildInputs = [ matplotlib procps pyqt5 ];
checkInputs = [ procps pythonPackages.mock pyqt5 xvfb_run ];
checkPhase = ''
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
'';
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
meta = with lib; {
description = "The FLExible Network Tester";
homepage = "https://flent.org";
license = licenses.gpl3;
maintainers = [ maintainers.mmlb ];
};
}