flent: 2.2.0 -> 2.3.0, qt5 -> qt6, add binaries
I decided to add the binaries flent wants instead of leaving it to the user to ensure they are around because its easier to use that way since these aren't really optional. flent-gui doesn't always need it but compared to qt these binaries don't take up much space. I also switched to using buildPythonApplication's makeWrapperArgs instead of hacking it in preFixup since this worked fine and seems better to use the explicitly supported way.
This commit is contained in:
@@ -2,18 +2,21 @@
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchPypi,
|
||||
qt6,
|
||||
irtt,
|
||||
iputils,
|
||||
netperf,
|
||||
procps,
|
||||
qt5,
|
||||
nix-update-script,
|
||||
}:
|
||||
python3Packages.buildPythonApplication (finalAttrs: {
|
||||
pname = "flent";
|
||||
version = "2.2.0";
|
||||
version = "2.3.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit (finalAttrs) pname version;
|
||||
hash = "sha256-BPwh3oWIY1YEI+ecgi9AUiX4Ka/Y5dYikwmfvvNB+eg=";
|
||||
hash = "sha256-qy+BvMpBDBtBqEEM9yEko/Gb2pusxF/LqiutSKlS2eE=";
|
||||
};
|
||||
|
||||
build-system = with python3Packages; [
|
||||
@@ -21,11 +24,23 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
||||
sphinx
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
||||
nativeBuildInputs = [ qt6.wrapQtAppsHook ];
|
||||
buildInputs = [ qt6.qtbase ];
|
||||
makeWrapperArgs = [
|
||||
"--prefix"
|
||||
"PATH"
|
||||
":"
|
||||
(lib.makeBinPath [
|
||||
iputils
|
||||
irtt
|
||||
netperf
|
||||
procps
|
||||
])
|
||||
];
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
matplotlib
|
||||
pyqt5
|
||||
pyqt6
|
||||
qtpy
|
||||
];
|
||||
|
||||
@@ -36,17 +51,10 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
||||
sed -i 's|self.skip|pass; #&|' unittests/test_gui.py
|
||||
|
||||
# Dummy qt setup for gui tests
|
||||
export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
|
||||
export QT_PLUGIN_PATH="${qt6.qtbase}/${qt6.qtbase.qtPluginPrefix}"
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
makeWrapperArgs+=(
|
||||
"''${qtWrapperArgs[@]}"
|
||||
--prefix PATH : ${lib.makeBinPath [ procps ]}
|
||||
)
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
meta = {
|
||||
description = "FLExible Network Tester";
|
||||
|
||||
Reference in New Issue
Block a user