nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 python3Packages,
4 fetchPypi,
5 procps,
6 qt5,
7 nix-update-script,
8}:
9python3Packages.buildPythonApplication rec {
10 pname = "flent";
11 version = "2.2.0";
12 pyproject = true;
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-BPwh3oWIY1YEI+ecgi9AUiX4Ka/Y5dYikwmfvvNB+eg=";
17 };
18
19 build-system = with python3Packages; [
20 setuptools
21 sphinx
22 ];
23
24 nativeBuildInputs = [ qt5.wrapQtAppsHook ];
25
26 dependencies = with python3Packages; [
27 matplotlib
28 pyqt5
29 qtpy
30 ];
31
32 nativeCheckInputs = [ python3Packages.unittestCheckHook ];
33
34 preCheck = ''
35 # we want the gui tests to always run
36 sed -i 's|self.skip|pass; #&|' unittests/test_gui.py
37
38 # Dummy qt setup for gui tests
39 export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
40 export QT_QPA_PLATFORM=offscreen
41 '';
42
43 preFixup = ''
44 makeWrapperArgs+=(
45 "''${qtWrapperArgs[@]}"
46 --prefix PATH : ${lib.makeBinPath [ procps ]}
47 )
48 '';
49
50 passthru.updateScript = nix-update-script { };
51 meta = {
52 description = "FLExible Network Tester";
53 homepage = "https://flent.org";
54 license = lib.licenses.gpl3;
55 maintainers = with lib.maintainers; [ mmlb ];
56 mainProgram = "flent";
57 badPlatforms = lib.platforms.darwin;
58 };
59}