From 1ba444e4007c3a14927919051d9bb9692bd23639 Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Thu, 8 Aug 2019 08:45:52 -0400 Subject: [PATCH 1/4] flent: run through nixfmt --- pkgs/applications/networking/flent/default.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/networking/flent/default.nix b/pkgs/applications/networking/flent/default.nix index bc0a519a0ee..00522d84569 100644 --- a/pkgs/applications/networking/flent/default.nix +++ b/pkgs/applications/networking/flent/default.nix @@ -1,6 +1,5 @@ { stdenv, buildPythonApplication, fetchFromGitHub, matplotlib, procps, pyqt5 -, sphinx -}: +, sphinx }: buildPythonApplication rec { pname = "flent"; @@ -16,15 +15,11 @@ buildPythonApplication rec { checkInputs = [ procps ]; - propagatedBuildInputs = [ - matplotlib - procps - pyqt5 - ]; + propagatedBuildInputs = [ matplotlib procps pyqt5 ]; meta = with stdenv.lib; { description = "The FLExible Network Tester"; - homepage = https://flent.org; + homepage = "https://flent.org"; license = licenses.gpl3; maintainers = [ maintainers.mmlb ]; From a88232c31ae733a5bc148175ea20549cc81e23b2 Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Thu, 8 Aug 2019 08:51:44 -0400 Subject: [PATCH 2/4] flent: use fetchPypi --- pkgs/applications/networking/flent/default.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/flent/default.nix b/pkgs/applications/networking/flent/default.nix index 00522d84569..ed7e8ae9d6a 100644 --- a/pkgs/applications/networking/flent/default.nix +++ b/pkgs/applications/networking/flent/default.nix @@ -1,14 +1,12 @@ -{ stdenv, buildPythonApplication, fetchFromGitHub, matplotlib, procps, pyqt5 +{ stdenv, buildPythonApplication, fetchPypi, matplotlib, procps, pyqt5 , sphinx }: buildPythonApplication rec { pname = "flent"; version = "1.2.2"; - src = fetchFromGitHub { - owner = "tohojo"; - repo = "flent"; - rev = "v${version}"; - sha256 = "1llcdakk0nk9xlpjjz7mv4a80yq4sjnbqhaqvyj9m6lbcxgssh2r"; + src = fetchPypi { + inherit pname version; + sha256 = "0ziblk36rzr99pbi7xzzkci3sr41m0jf72v38ynp63df6szbbfjb"; }; buildInputs = [ sphinx ]; From a48c4843cd228f041dc75a120cbfa216e9a2f66a Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Thu, 8 Aug 2019 08:57:04 -0400 Subject: [PATCH 3/4] flent: use wrapQtAppsHook --- pkgs/applications/networking/flent/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/flent/default.nix b/pkgs/applications/networking/flent/default.nix index ed7e8ae9d6a..9b170735dcf 100644 --- a/pkgs/applications/networking/flent/default.nix +++ b/pkgs/applications/networking/flent/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonApplication, fetchPypi, matplotlib, procps, pyqt5 +{ stdenv, buildPythonApplication, fetchPypi, matplotlib, procps, pyqt5, qt5 , sphinx }: buildPythonApplication rec { @@ -10,11 +10,18 @@ buildPythonApplication rec { }; buildInputs = [ sphinx ]; + nativeBuildInputs = [ qt5.wrapQtAppsHook ]; checkInputs = [ procps ]; propagatedBuildInputs = [ matplotlib procps pyqt5 ]; + postInstall = '' + for program in $out/bin/*; do + wrapQtApp $program --prefix PYTHONPATH : $PYTHONPATH + done + ''; + meta = with stdenv.lib; { description = "The FLExible Network Tester"; homepage = "https://flent.org"; From 170caa4506fe40ebbbc47be62934161d2d6c0bb7 Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Thu, 8 Aug 2019 09:03:41 -0400 Subject: [PATCH 4/4] flent: 1.2.2 -> 1.3.0 --- .../applications/networking/flent/default.nix | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/networking/flent/default.nix b/pkgs/applications/networking/flent/default.nix index 9b170735dcf..bbd9a7601ac 100644 --- a/pkgs/applications/networking/flent/default.nix +++ b/pkgs/applications/networking/flent/default.nix @@ -1,20 +1,29 @@ -{ stdenv, buildPythonApplication, fetchPypi, matplotlib, procps, pyqt5, qt5 -, sphinx }: +{ stdenv, buildPythonApplication, fetchPypi, matplotlib, procps, pyqt5, python +, pythonPackages, qt5, sphinx, xvfb_run }: buildPythonApplication rec { pname = "flent"; - version = "1.2.2"; + version = "1.3.0"; src = fetchPypi { inherit pname version; - sha256 = "0ziblk36rzr99pbi7xzzkci3sr41m0jf72v38ynp63df6szbbfjb"; + sha256 = "099779i0ghjd9ikq77z6m6scnlmk946lw9issrgz8zm7babiw4d7"; }; buildInputs = [ sphinx ]; nativeBuildInputs = [ qt5.wrapQtAppsHook ]; - - checkInputs = [ procps ]; - propagatedBuildInputs = [ matplotlib procps pyqt5 ]; + checkInputs = [ procps pythonPackages.mock pyqt5 xvfb_run ]; + + checkPhase = '' + cat >test-runner <