Skip to content

Commit

Permalink
Merge pull request #256362 from anthonyroussel/gns3_2_2_43
Browse files Browse the repository at this point in the history
gns3-server,gns3-gui: 2.2.42 -> 2.2.43
  • Loading branch information
marsam authored Sep 21, 2023
2 parents abf66d3 + 62eb157 commit c3bafdd
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 28 deletions.
16 changes: 8 additions & 8 deletions pkgs/applications/networking/gns3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ in {

guiStable = mkGui {
channel = "stable";
version = "2.2.42";
hash = "sha256-FW8Nuha+NrYVhR/66AiBpcCLHRhiLTW8KdHFyWSao84=";
version = "2.2.43";
hash = "sha256-+2dcyWnTJqGaH9yhknYc9/0gnj3qh80eAy6uxG7+fFM=";
};

guiPreview = mkGui {
channel = "stable";
version = "2.2.42";
hash = "sha256-FW8Nuha+NrYVhR/66AiBpcCLHRhiLTW8KdHFyWSao84=";
version = "2.2.43";
hash = "sha256-+2dcyWnTJqGaH9yhknYc9/0gnj3qh80eAy6uxG7+fFM=";
};

serverStable = mkServer {
channel = "stable";
version = "2.2.42";
hash = "sha256-YM07krEay2W+/6mKLAg+B7VEnAyDlkD+0+cSO1FAJzA=";
version = "2.2.43";
hash = "sha256-xWt2qzeqBtt86Wv3dYl4GXkfjr+7WAKn5HdDeUzOQd8=";
};

serverPreview = mkServer {
channel = "stable";
version = "2.2.42";
hash = "sha256-YM07krEay2W+/6mKLAg+B7VEnAyDlkD+0+cSO1FAJzA=";
version = "2.2.43";
hash = "sha256-xWt2qzeqBtt86Wv3dYl4GXkfjr+7WAKn5HdDeUzOQd8=";
};
}
24 changes: 16 additions & 8 deletions pkgs/applications/networking/gns3/gui.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{ lib
, python3
, fetchFromGitHub
, qt5
, wrapQtAppsHook
}:

Expand All @@ -21,7 +22,6 @@ python3.pkgs.buildPythonApplication rec {
};

nativeBuildInputs = with python3.pkgs; [
pythonRelaxDepsHook
wrapQtAppsHook
];

Expand All @@ -33,21 +33,29 @@ python3.pkgs.buildPythonApplication rec {
setuptools
sip_4 (pyqt5.override { withWebSockets = true; })
truststore
] ++ lib.optionals (pythonOlder "3.9") [
importlib-resources
];

pythonRelaxDeps = [
"jsonschema"
"sentry-sdk"
];

doCheck = false; # Failing

dontWrapQtApps = true;

preFixup = ''
wrapQtApp "$out/bin/gns3"
'';

doCheck = true;

checkInputs = with python3.pkgs; [
pytestCheckHook
];

preCheck = ''
export HOME=$(mktemp -d)
export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
export QT_QPA_PLATFORM=offscreen
'';

meta = with lib; {
description = "Graphical Network Simulator 3 GUI (${channel} release)";
longDescription = ''
Expand Down
36 changes: 24 additions & 12 deletions pkgs/applications/networking/gns3/server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
, python3
, fetchFromGitHub
, pkgsStatic
, stdenv
}:

python3.pkgs.buildPythonApplication {
Expand All @@ -25,14 +26,6 @@ python3.pkgs.buildPythonApplication {
cp ${pkgsStatic.busybox}/bin/busybox gns3server/compute/docker/resources/bin/busybox
'';

nativeBuildInputs = with python3.pkgs; [
pythonRelaxDepsHook
];

pythonRelaxDeps = [
"jsonschema"
];

propagatedBuildInputs = with python3.pkgs; [
aiofiles
aiohttp
Expand All @@ -43,6 +36,7 @@ python3.pkgs.buildPythonApplication {
jinja2
jsonschema
multidict
platformdirs
prompt-toolkit
psutil
py-cpuinfo
Expand All @@ -53,13 +47,31 @@ python3.pkgs.buildPythonApplication {
zipstream
];

# Requires network access
doCheck = false;
postInstall = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
rm $out/bin/gns3loopback
'';

doCheck = true;

postInstall = ''
rm $out/bin/gns3loopback # For Windows only
# Otherwise tests will fail to create directory
# Permission denied: '/homeless-shelter'
preCheck = ''
export HOME=$(mktemp -d)
'';

checkInputs = with python3.pkgs; [
pytest-aiohttp
pytest-rerunfailures
pytestCheckHook
];

pytestFlagsArray = [
# fails on ofborg because of lack of cpu vendor information
"--deselect=tests/controller/gns3vm/test_virtualbox_gns3_vm.py::test_cpu_vendor_id"
# Rerun failed tests up to three times (flaky tests)
"--reruns 3"
];

meta = with lib; {
description = "Graphical Network Simulator 3 server (${channel} release)";
longDescription = ''
Expand Down

0 comments on commit c3bafdd

Please sign in to comment.