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 67% rename from pkgs/applications/networking/gns3/gui.nix rename to pkgs/by-name/gn/gns3-gui/package.nix index ef9eb9cda64b..e147afc1ee32 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,7 @@ python3Packages, qt5, testers, - wrapQtAppsHook, + writableTmpDirAsHomeHook, }: let @@ -23,22 +17,27 @@ let in pythonPackages.buildPythonApplication rec { pname = "gns3-gui"; - inherit version; - format = "setuptools"; + version = "2.2.55"; + pyproject = true; src = fetchFromGitHub { - inherit hash; owner = "GNS3"; repo = "gns3-gui"; tag = "v${version}"; + hash = "sha256-6jblQakNpoSQXfy5pU68Aedg661VcwpqQilvqOV15pQ"; }; - nativeBuildInputs = [ wrapQtAppsHook ]; + pythonRelaxDeps = [ + "jsonschema" + "sentry-sdk" + ]; + + nativeBuildInputs = [ qt5.wrapQtAppsHook ]; + + buildInputs = [ qt5.qtwayland ]; build-system = with pythonPackages; [ setuptools ]; - propagatedBuildInputs = [ qt5.qtwayland ]; - dependencies = with pythonPackages; [ distro jsonschema @@ -53,17 +52,17 @@ pythonPackages.buildPythonApplication rec { dontWrapQtApps = true; preFixup = '' - wrapQtApp "$out/bin/gns3" + 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 ''; @@ -73,7 +72,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 82% rename from pkgs/applications/networking/gns3/server.nix rename to pkgs/by-name/gn/gns3-server/package.nix index 00d84dddfd9d..b08cdbef2527 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, @@ -14,18 +8,19 @@ stdenv, testers, util-linux, + writableTmpDirAsHomeHook, }: -python3Packages.buildPythonApplication { +python3Packages.buildPythonApplication rec { pname = "gns3-server"; - inherit version; - format = "setuptools"; + version = "2.2.55"; + pyproject = true; 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 @@ -33,6 +28,14 @@ python3Packages.buildPythonApplication { 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; [ @@ -40,6 +43,7 @@ python3Packages.buildPythonApplication { aiohttp aiohttp-cors async-generator + async-timeout distro jinja2 jsonschema @@ -60,18 +64,11 @@ python3Packages.buildPythonApplication { # 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 = [ @@ -94,7 +91,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 559f79a71185..ab2536fbbed8 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -778,6 +778,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 62ad43344497..a33d745bd105 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6916,9 +6916,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 { };