File tree Expand file tree Collapse file tree 1 file changed +8
-19
lines changed Expand file tree Collapse file tree 1 file changed +8
-19
lines changed Original file line number Diff line number Diff line change 44 fetchPypi ,
55 procps ,
66 qt5 ,
7- xvfb-run ,
7+ nix-update-script ,
88} :
99python3Packages . buildPythonApplication rec {
1010 pname = "flent" ;
@@ -25,28 +25,15 @@ python3Packages.buildPythonApplication rec {
2525 qtpy
2626 ] ;
2727
28- nativeCheckInputs = [
29- python3Packages . mock
30- xvfb-run
31- ] ;
32-
33- checkPhase = ''
34- runHook preCheck
28+ nativeCheckInputs = [ python3Packages . unittestCheckHook ] ;
3529
30+ preCheck = ''
3631 # we want the gui tests to always run
3732 sed -i 's|self.skip|pass; #&|' unittests/test_gui.py
3833
39- export XDG_RUNTIME_DIR=$(mktemp -d)
40- export HOME=$(mktemp -d)
41- cat >test-runner <<EOF
42- #!/bin/sh
43- ${ python3Packages . python . interpreter } -m unittest discover
44- EOF
45- chmod +x test-runner
46- wrapQtApp test-runner --prefix PYTHONPATH : $PYTHONPATH
47- xvfb-run -s '-screen 0 800x600x24' ./test-runner
48-
49- runHook postCheck
34+ # Dummy qt setup for gui tests
35+ export QT_PLUGIN_PATH="${ qt5 . qtbase . bin } /${ qt5 . qtbase . qtPluginPrefix } "
36+ export QT_QPA_PLATFORM=offscreen
5037 '' ;
5138
5239 preFixup = ''
@@ -56,11 +43,13 @@ python3Packages.buildPythonApplication rec {
5643 )
5744 '' ;
5845
46+ passthru . updateScript = nix-update-script { } ;
5947 meta = {
6048 description = "FLExible Network Tester" ;
6149 homepage = "https://flent.org" ;
6250 license = lib . licenses . gpl3 ;
6351 maintainers = with lib . maintainers ; [ mmlb ] ;
6452 mainProgram = "flent" ;
53+ badPlatforms = lib . platforms . darwin ;
6554 } ;
6655}
You can’t perform that action at this time.
0 commit comments