From 9132a2c6bd628dcb07067767731a988b49876304 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Fri, 12 Jul 2024 22:22:12 +0200 Subject: [PATCH 1/4] gns3-gui: 2.2.47 -> 2.2.49 https://github.com/GNS3/gns3-gui/releases/tag/v2.2.49 https://github.com/GNS3/gns3-gui/compare/v2.2.47...v2.2.49 --- pkgs/applications/networking/gns3/default.nix | 12 ++++++------ pkgs/applications/networking/gns3/gui.nix | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix index 8048b87409c1..579ae91d9cd1 100644 --- a/pkgs/applications/networking/gns3/default.nix +++ b/pkgs/applications/networking/gns3/default.nix @@ -1,12 +1,12 @@ { callPackage , libsForQt5 -, python311 +, python311Packages }: let mkGui = args: callPackage (import ./gui.nix (args)) { inherit (libsForQt5) wrapQtAppsHook; - python3 = python311; + python3Packages = python311Packages; }; mkServer = args: callPackage (import ./server.nix (args)) { }; @@ -14,14 +14,14 @@ in { guiStable = mkGui { channel = "stable"; - version = "2.2.47"; - hash = "sha256-6UXQTPkRHbtNX6RzWMakCsO9YpkFlWliNnm+mZ4wuZA="; + version = "2.2.49"; + hash = "sha256-hvLJ4VilcgtpxHeboeSUuGAco9LEnUB8J6vy/ZPajbU="; }; guiPreview = mkGui { channel = "stable"; - version = "2.2.47"; - hash = "sha256-6UXQTPkRHbtNX6RzWMakCsO9YpkFlWliNnm+mZ4wuZA="; + version = "2.2.49"; + hash = "sha256-hvLJ4VilcgtpxHeboeSUuGAco9LEnUB8J6vy/ZPajbU="; }; serverStable = mkServer { diff --git a/pkgs/applications/networking/gns3/gui.nix b/pkgs/applications/networking/gns3/gui.nix index dfa92a444e0f..e7a3640c59ef 100644 --- a/pkgs/applications/networking/gns3/gui.nix +++ b/pkgs/applications/networking/gns3/gui.nix @@ -4,7 +4,7 @@ }: { lib -, python3 +, python3Packages , fetchFromGitHub , qt5 , wrapQtAppsHook @@ -12,22 +12,28 @@ , gns3-gui }: -python3.pkgs.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "gns3-gui"; inherit version; src = fetchFromGitHub { inherit hash; owner = "GNS3"; - repo = pname; + repo = "gns3-gui"; rev = "refs/tags/v${version}"; }; - nativeBuildInputs = with python3.pkgs; [ + nativeBuildInputs = with python3Packages; [ wrapQtAppsHook ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3Packages; [ setuptools ]; + + propagatedBuildInputs = [ + qt5.qtwayland + ]; + + dependencies = with python3Packages; [ distro jsonschema psutil @@ -36,7 +42,6 @@ python3.pkgs.buildPythonApplication rec { sip (pyqt5.override { withWebSockets = true; }) truststore - qt5.qtwayland ] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ]; @@ -49,7 +54,7 @@ python3.pkgs.buildPythonApplication rec { doCheck = true; - checkInputs = with python3.pkgs; [ + checkInputs = with python3Packages; [ pytestCheckHook ]; From 8fac7d922ec14b6f7136f5d92a38d8e6e471155b Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Fri, 12 Jul 2024 22:24:34 +0200 Subject: [PATCH 2/4] gns3-server: 2.2.47 -> 2.2.49 https://github.com/GNS3/gns3-server/releases/tag/v2.2.49 https://github.com/GNS3/gns3-server/compare/v2.2.47...v2.2.49 --- pkgs/applications/networking/gns3/default.nix | 8 ++++---- pkgs/applications/networking/gns3/server.nix | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix index 579ae91d9cd1..10f230603b1b 100644 --- a/pkgs/applications/networking/gns3/default.nix +++ b/pkgs/applications/networking/gns3/default.nix @@ -26,13 +26,13 @@ in { serverStable = mkServer { channel = "stable"; - version = "2.2.47"; - hash = "sha256-iZ/1qACPLe7r1cZMhJbFRjVt/FlVgadBgp9tJwvYSi0="; + version = "2.2.49"; + hash = "sha256-fI49MxA6b2kPkUihLl32a6jo8oHcEwDEjmvSVDj8/So="; }; serverPreview = mkServer { channel = "stable"; - version = "2.2.47"; - hash = "sha256-iZ/1qACPLe7r1cZMhJbFRjVt/FlVgadBgp9tJwvYSi0="; + version = "2.2.49"; + hash = "sha256-fI49MxA6b2kPkUihLl32a6jo8oHcEwDEjmvSVDj8/So="; }; } diff --git a/pkgs/applications/networking/gns3/server.nix b/pkgs/applications/networking/gns3/server.nix index c6ba5fe2b93e..4aa46a76e5c3 100644 --- a/pkgs/applications/networking/gns3/server.nix +++ b/pkgs/applications/networking/gns3/server.nix @@ -30,7 +30,9 @@ python3Packages.buildPythonApplication { cp ${pkgsStatic.busybox}/bin/busybox gns3server/compute/docker/resources/bin/busybox ''; - propagatedBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools ]; + + dependencies = with python3Packages; [ aiofiles aiohttp aiohttp-cors @@ -44,7 +46,6 @@ python3Packages.buildPythonApplication { psutil py-cpuinfo sentry-sdk - setuptools truststore yarl ] ++ lib.optionals (pythonOlder "3.9") [ @@ -69,7 +70,7 @@ python3Packages.buildPythonApplication { checkInputs = with python3Packages; [ pytest-aiohttp pytest-rerunfailures - (pytestCheckHook.override { pytest = pytest_7; }) + pytestCheckHook ]; pytestFlagsArray = [ From a3c8723d2b63450414935297992be420e208fc58 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Fri, 12 Jul 2024 22:51:27 +0200 Subject: [PATCH 3/4] gns3-gui,gns3-server: format with nixfmt-rfc-style --- pkgs/applications/networking/gns3/default.nix | 4 +-- pkgs/applications/networking/gns3/gui.nix | 34 ++++++++----------- pkgs/applications/networking/gns3/server.nix | 26 +++++++------- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix index 10f230603b1b..c34309258fc9 100644 --- a/pkgs/applications/networking/gns3/default.nix +++ b/pkgs/applications/networking/gns3/default.nix @@ -10,8 +10,8 @@ let }; mkServer = args: callPackage (import ./server.nix (args)) { }; -in { - +in +{ guiStable = mkGui { channel = "stable"; version = "2.2.49"; diff --git a/pkgs/applications/networking/gns3/gui.nix b/pkgs/applications/networking/gns3/gui.nix index e7a3640c59ef..291fdfcf7b0b 100644 --- a/pkgs/applications/networking/gns3/gui.nix +++ b/pkgs/applications/networking/gns3/gui.nix @@ -1,15 +1,17 @@ -{ channel -, version -, hash +{ + channel, + version, + hash, }: -{ lib -, python3Packages -, fetchFromGitHub -, qt5 -, wrapQtAppsHook -, testers -, gns3-gui +{ + fetchFromGitHub, + gns3-gui, + lib, + python3Packages, + qt5, + testers, + wrapQtAppsHook, }: python3Packages.buildPythonApplication rec { @@ -23,15 +25,11 @@ python3Packages.buildPythonApplication rec { rev = "refs/tags/v${version}"; }; - nativeBuildInputs = with python3Packages; [ - wrapQtAppsHook - ]; + nativeBuildInputs = with python3Packages; [ wrapQtAppsHook ]; build-system = with python3Packages; [ setuptools ]; - propagatedBuildInputs = [ - qt5.qtwayland - ]; + propagatedBuildInputs = [ qt5.qtwayland ]; dependencies = with python3Packages; [ distro @@ -54,9 +52,7 @@ python3Packages.buildPythonApplication rec { doCheck = true; - checkInputs = with python3Packages; [ - pytestCheckHook - ]; + checkInputs = with python3Packages; [ pytestCheckHook ]; preCheck = '' export HOME=$(mktemp -d) diff --git a/pkgs/applications/networking/gns3/server.nix b/pkgs/applications/networking/gns3/server.nix index 4aa46a76e5c3..aea637ae2528 100644 --- a/pkgs/applications/networking/gns3/server.nix +++ b/pkgs/applications/networking/gns3/server.nix @@ -1,17 +1,19 @@ -{ channel -, version -, hash +{ + channel, + version, + hash, }: -{ lib -, python3Packages -, fetchFromGitHub -, pkgsStatic -, stdenv -, nixosTests -, testers -, util-linux -, gns3-server +{ + fetchFromGitHub, + gns3-server, + lib, + nixosTests, + pkgsStatic, + python3Packages, + stdenv, + testers, + util-linux, }: python3Packages.buildPythonApplication { From 7694000762c2b64ebdeea157ce533a9a11c7e925 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Fri, 12 Jul 2024 22:52:31 +0200 Subject: [PATCH 4/4] gns3-gui,gns3-server: remove `with lib;` notation --- pkgs/applications/networking/gns3/gui.nix | 8 ++++---- pkgs/applications/networking/gns3/server.nix | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/networking/gns3/gui.nix b/pkgs/applications/networking/gns3/gui.nix index 291fdfcf7b0b..e01380bc286a 100644 --- a/pkgs/applications/networking/gns3/gui.nix +++ b/pkgs/applications/networking/gns3/gui.nix @@ -66,7 +66,7 @@ python3Packages.buildPythonApplication rec { command = "${lib.getExe gns3-gui} --version"; }; - meta = with lib; { + meta = { description = "Graphical Network Simulator 3 GUI (${channel} release)"; longDescription = '' Graphical user interface for controlling the GNS3 network simulator. This @@ -75,9 +75,9 @@ python3Packages.buildPythonApplication rec { ''; homepage = "https://www.gns3.com/"; changelog = "https://github.com/GNS3/gns3-gui/releases/tag/v${version}"; - license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ anthonyroussel ]; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ anthonyroussel ]; mainProgram = "gns3"; }; } diff --git a/pkgs/applications/networking/gns3/server.nix b/pkgs/applications/networking/gns3/server.nix index aea637ae2528..dec90b620f70 100644 --- a/pkgs/applications/networking/gns3/server.nix +++ b/pkgs/applications/networking/gns3/server.nix @@ -90,7 +90,7 @@ python3Packages.buildPythonApplication { }; }; - meta = with lib; { + meta = { description = "Graphical Network Simulator 3 server (${channel} release)"; longDescription = '' The GNS3 server manages emulators such as Dynamips, VirtualBox or @@ -99,9 +99,9 @@ python3Packages.buildPythonApplication { ''; homepage = "https://www.gns3.com/"; changelog = "https://github.com/GNS3/gns3-server/releases/tag/v${version}"; - license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ anthonyroussel ]; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ anthonyroussel ]; mainProgram = "gns3server"; }; }