From 6d3f640b11fe981464426b122ace10798b38e0e1 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 18 Jan 2026 20:55:25 +0100 Subject: [PATCH 1/2] gns3-server,gns3-gui: migrate to pkgs/by-name --- pkgs/applications/networking/gns3/default.nix | 39 ------------------- .../gn/gns3-gui/package.nix} | 17 +++----- .../gn/gns3-server/package.nix} | 14 ++----- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 3 -- 5 files changed, 10 insertions(+), 64 deletions(-) delete mode 100644 pkgs/applications/networking/gns3/default.nix rename pkgs/{applications/networking/gns3/gui.nix => by-name/gn/gns3-gui/package.nix} (87%) rename pkgs/{applications/networking/gns3/server.nix => by-name/gn/gns3-server/package.nix} (92%) diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix deleted file mode 100644 index 45f160931758..000000000000 --- a/pkgs/applications/networking/gns3/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - callPackage, - libsForQt5, -}: - -let - mkGui = - args: - callPackage (import ./gui.nix args) { - inherit (libsForQt5) wrapQtAppsHook; - }; - - mkServer = args: callPackage (import ./server.nix args) { }; -in -{ - guiStable = mkGui { - channel = "stable"; - version = "2.2.55"; - hash = "sha256-6jblQakNpoSQXfy5pU68Aedg661VcwpqQilvqOV15pQ="; - }; - - guiPreview = mkGui { - channel = "stable"; - version = "2.2.55"; - hash = "sha256-6jblQakNpoSQXfy5pU68Aedg661VcwpqQilvqOV15pQ="; - }; - - serverStable = mkServer { - channel = "stable"; - version = "2.2.55"; - hash = "sha256-o04RrHYsa5sWYUBDLJ5xgcK4iJK8CfZ4YdAiZ4eV/o4="; - }; - - serverPreview = mkServer { - channel = "stable"; - version = "2.2.55"; - hash = "sha256-o04RrHYsa5sWYUBDLJ5xgcK4iJK8CfZ4YdAiZ4eV/o4="; - }; -} diff --git a/pkgs/applications/networking/gns3/gui.nix b/pkgs/by-name/gn/gns3-gui/package.nix similarity index 87% rename from pkgs/applications/networking/gns3/gui.nix rename to pkgs/by-name/gn/gns3-gui/package.nix index ef9eb9cda64b..425e11842c00 100644 --- a/pkgs/applications/networking/gns3/gui.nix +++ b/pkgs/by-name/gn/gns3-gui/package.nix @@ -1,9 +1,3 @@ -{ - channel, - version, - hash, -}: - { fetchFromGitHub, gns3-gui, @@ -11,7 +5,6 @@ python3Packages, qt5, testers, - wrapQtAppsHook, }: let @@ -23,17 +16,17 @@ let in pythonPackages.buildPythonApplication rec { pname = "gns3-gui"; - inherit version; + version = "2.2.55"; format = "setuptools"; src = fetchFromGitHub { - inherit hash; owner = "GNS3"; repo = "gns3-gui"; tag = "v${version}"; + hash = "sha256-6jblQakNpoSQXfy5pU68Aedg661VcwpqQilvqOV15pQ"; }; - nativeBuildInputs = [ wrapQtAppsHook ]; + nativeBuildInputs = [ qt5.wrapQtAppsHook ]; build-system = with pythonPackages; [ setuptools ]; @@ -53,7 +46,7 @@ pythonPackages.buildPythonApplication rec { dontWrapQtApps = true; preFixup = '' - wrapQtApp "$out/bin/gns3" + makeWrapperArgs+=("''${qtWrapperArgs[@]}") ''; doCheck = true; @@ -73,7 +66,7 @@ pythonPackages.buildPythonApplication rec { }; meta = { - description = "Graphical Network Simulator 3 GUI (${channel} release)"; + description = "Graphical Network Simulator 3 GUI"; longDescription = '' Graphical user interface for controlling the GNS3 network simulator. This requires access to a local or remote GNS3 server (it's recommended to diff --git a/pkgs/applications/networking/gns3/server.nix b/pkgs/by-name/gn/gns3-server/package.nix similarity index 92% rename from pkgs/applications/networking/gns3/server.nix rename to pkgs/by-name/gn/gns3-server/package.nix index 00d84dddfd9d..cef09de058eb 100644 --- a/pkgs/applications/networking/gns3/server.nix +++ b/pkgs/by-name/gn/gns3-server/package.nix @@ -1,9 +1,3 @@ -{ - channel, - version, - hash, -}: - { fetchFromGitHub, gns3-server, @@ -16,16 +10,16 @@ util-linux, }: -python3Packages.buildPythonApplication { +python3Packages.buildPythonApplication rec { pname = "gns3-server"; - inherit version; + version = "2.2.55"; format = "setuptools"; src = fetchFromGitHub { - inherit hash; owner = "GNS3"; repo = "gns3-server"; tag = "v${version}"; + hash = "sha256-o04RrHYsa5sWYUBDLJ5xgcK4iJK8CfZ4YdAiZ4eV/o4="; }; # GNS3 2.3.26 requires a static BusyBox for the Docker integration @@ -94,7 +88,7 @@ python3Packages.buildPythonApplication { }; meta = { - description = "Graphical Network Simulator 3 server (${channel} release)"; + description = "Graphical Network Simulator 3 server"; longDescription = '' The GNS3 server manages emulators such as Dynamips, VirtualBox or Qemu/KVM. Clients like the GNS3 GUI control the server using a HTTP REST diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 479af8a8f89e..408ed6ed3129 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -743,6 +743,7 @@ mapAliases { gnome-passwordsafe = throw "'gnome-passwordsafe' has been renamed to/replaced by 'gnome-secrets'"; # Converted to throw 2025-10-27 gnome-recipes = throw "'gnome-recipes' has been removed due to lack of upstream maintenance and dependency on insecure libraries"; # Added 2025-09-06 gnome-resources = throw "'gnome-resources' has been renamed to/replaced by 'resources'"; # Converted to throw 2025-10-27 + gns3Packages = throw "'gns3Packages' has been removed. Use 'gns3-gui' and 'gns3-server' instead."; # Added 2026-01-18 gnu-cobol = throw "'gnu-cobol' has been renamed to/replaced by 'gnucobol'"; # Converted to throw 2025-10-27 gnubik = throw "'gnubik' has been removed due to lack of maintenance upstream and its dependency on GTK 2"; # Added 2025-09-16 go-thumbnailer = throw "'go-thumbnailer' has been renamed to/replaced by 'thud'"; # Converted to throw 2025-10-27 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 18999d08e654..7ad2e01c4d78 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6945,9 +6945,6 @@ with pkgs; #GMP ex-satellite, so better keep it near gmp # A GMP fork - gns3Packages = recurseIntoAttrs (callPackage ../applications/networking/gns3 { }); - gns3-gui = gns3Packages.guiStable; - gns3-server = gns3Packages.serverStable; gobject-introspection = callPackage ../development/libraries/gobject-introspection/wrapper.nix { }; From 01951bed8cbe0ca5607a9651f2544b260963ec76 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 18 Jan 2026 21:18:46 +0100 Subject: [PATCH 2/2] gns3-server,gns3-gui: use pyproject = true --- pkgs/by-name/gn/gns3-gui/package.nix | 24 +++++++++++++++--------- pkgs/by-name/gn/gns3-server/package.nix | 23 +++++++++++++---------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/pkgs/by-name/gn/gns3-gui/package.nix b/pkgs/by-name/gn/gns3-gui/package.nix index 425e11842c00..e147afc1ee32 100644 --- a/pkgs/by-name/gn/gns3-gui/package.nix +++ b/pkgs/by-name/gn/gns3-gui/package.nix @@ -5,6 +5,7 @@ python3Packages, qt5, testers, + writableTmpDirAsHomeHook, }: let @@ -17,7 +18,7 @@ in pythonPackages.buildPythonApplication rec { pname = "gns3-gui"; version = "2.2.55"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "GNS3"; @@ -26,11 +27,16 @@ pythonPackages.buildPythonApplication rec { hash = "sha256-6jblQakNpoSQXfy5pU68Aedg661VcwpqQilvqOV15pQ"; }; + pythonRelaxDeps = [ + "jsonschema" + "sentry-sdk" + ]; + nativeBuildInputs = [ qt5.wrapQtAppsHook ]; - build-system = with pythonPackages; [ setuptools ]; + buildInputs = [ qt5.qtwayland ]; - propagatedBuildInputs = [ qt5.qtwayland ]; + build-system = with pythonPackages; [ setuptools ]; dependencies = with pythonPackages; [ distro @@ -49,14 +55,14 @@ pythonPackages.buildPythonApplication rec { makeWrapperArgs+=("''${qtWrapperArgs[@]}") ''; - doCheck = true; - - checkInputs = with pythonPackages; [ pytestCheckHook ]; + nativeCheckInputs = with pythonPackages; [ + pytestCheckHook + writableTmpDirAsHomeHook + ]; 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_PLUGIN_PATH="${lib.getBin qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}" + export QT_QPA_PLATFORM_PLUGIN_PATH="${lib.getBin qt5.qtbase}/lib/qt-${qt5.qtbase.version}/plugins"; export QT_QPA_PLATFORM=offscreen ''; diff --git a/pkgs/by-name/gn/gns3-server/package.nix b/pkgs/by-name/gn/gns3-server/package.nix index cef09de058eb..b08cdbef2527 100644 --- a/pkgs/by-name/gn/gns3-server/package.nix +++ b/pkgs/by-name/gn/gns3-server/package.nix @@ -8,12 +8,13 @@ stdenv, testers, util-linux, + writableTmpDirAsHomeHook, }: python3Packages.buildPythonApplication rec { pname = "gns3-server"; version = "2.2.55"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "GNS3"; @@ -27,6 +28,14 @@ python3Packages.buildPythonApplication rec { cp ${pkgsStatic.busybox}/bin/busybox gns3server/compute/docker/resources/bin/busybox ''; + pythonRelaxDeps = [ + "aiohttp" + "aiohttp-cors" + "jsonschema" + "platformdirs" + "sentry-sdk" + ]; + build-system = with python3Packages; [ setuptools ]; dependencies = with python3Packages; [ @@ -34,6 +43,7 @@ python3Packages.buildPythonApplication rec { aiohttp aiohttp-cors async-generator + async-timeout distro jinja2 jsonschema @@ -54,18 +64,11 @@ python3Packages.buildPythonApplication rec { # util-linux (script program) is required for Docker support makeWrapperArgs = [ "--suffix PATH : ${lib.makeBinPath [ util-linux ]}" ]; - doCheck = true; - - # Otherwise tests will fail to create directory - # Permission denied: '/homeless-shelter' - preCheck = '' - export HOME=$(mktemp -d) - ''; - - checkInputs = with python3Packages; [ + nativeCheckInputs = with python3Packages; [ pytest-aiohttp pytest-rerunfailures pytestCheckHook + writableTmpDirAsHomeHook ]; pytestFlags = [