From a2498f5aced9c3653b33f3f8daba893d6fbbad30 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 26 Jun 2020 15:18:34 +0200 Subject: gns3-gui: Replace qt5Full with wrapQtApp (proper solution) This will now properly wrap the gns3 binary using wrapQtApp instead of unnecessarily adding qt5Full to the PATH (which significantly increases the closure and often causes the build to break due to broken transitive dependencies). This supersedes the old approach from commit 0eaec4dee27. --- pkgs/applications/networking/gns3/default.nix | 4 ++-- pkgs/applications/networking/gns3/gui.nix | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'pkgs/applications/networking/gns3') diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix index f4d377c4c55..73f2ab25264 100644 --- a/pkgs/applications/networking/gns3/default.nix +++ b/pkgs/applications/networking/gns3/default.nix @@ -1,4 +1,4 @@ -{ callPackage }: +{ callPackage, libsForQt5 }: let stableVersion = "2.2.12"; @@ -24,7 +24,7 @@ let "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68") ]; }; - mkGui = args: callPackage (import ./gui.nix (addVersion args // extraArgs)) { }; + mkGui = args: libsForQt5.callPackage (import ./gui.nix (addVersion args // extraArgs)) { }; mkServer = args: callPackage (import ./server.nix (addVersion args // extraArgs)) { }; guiSrcHash = "05nnil8ljyj6h366yrniv6syznhhbnb7nzjkz5785rb9pzjizs19"; serverSrcHash = "0gmfdnymiw4w13qbcsvd71yj3hc9640n43c305vq39hahvsn7rvc"; diff --git a/pkgs/applications/networking/gns3/gui.nix b/pkgs/applications/networking/gns3/gui.nix index 7cdc74dfd48..8eb688bcd56 100644 --- a/pkgs/applications/networking/gns3/gui.nix +++ b/pkgs/applications/networking/gns3/gui.nix @@ -1,6 +1,6 @@ { stable, branch, version, sha256Hash, mkOverride, commonOverrides }: -{ lib, stdenv, python3, pkgs, fetchFromGitHub }: +{ lib, python3, fetchFromGitHub, wrapQtAppsHook }: let defaultOverrides = commonOverrides ++ [ @@ -20,16 +20,20 @@ in python.pkgs.buildPythonPackage rec { sha256 = sha256Hash; }; + nativeBuildInputs = [ wrapQtAppsHook ]; propagatedBuildInputs = with python.pkgs; [ sentry-sdk psutil jsonschema # tox for check # Runtime dependencies sip (pyqt5.override { withWebSockets = true; }) distro setuptools - pkgs.qt5Full ]; doCheck = false; # Failing + dontWrapQtApps = true; + postFixup = '' + wrapQtApp "$out/bin/gns3" + ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Graphical Network Simulator 3 GUI (${branch} release)"; longDescription = '' Graphical user interface for controlling the GNS3 network simulator. This -- cgit 1.4.1