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.
This commit is contained in:
Michael Weiss 2020-06-26 15:18:34 +02:00
parent b5eb32289c
commit a2498f5ace
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83
2 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,4 @@
{ callPackage }: { callPackage, libsForQt5 }:
let let
stableVersion = "2.2.12"; stableVersion = "2.2.12";
@ -24,7 +24,7 @@ let
"0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68") "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)) { }; mkServer = args: callPackage (import ./server.nix (addVersion args // extraArgs)) { };
guiSrcHash = "05nnil8ljyj6h366yrniv6syznhhbnb7nzjkz5785rb9pzjizs19"; guiSrcHash = "05nnil8ljyj6h366yrniv6syznhhbnb7nzjkz5785rb9pzjizs19";
serverSrcHash = "0gmfdnymiw4w13qbcsvd71yj3hc9640n43c305vq39hahvsn7rvc"; serverSrcHash = "0gmfdnymiw4w13qbcsvd71yj3hc9640n43c305vq39hahvsn7rvc";

View File

@ -1,6 +1,6 @@
{ stable, branch, version, sha256Hash, mkOverride, commonOverrides }: { stable, branch, version, sha256Hash, mkOverride, commonOverrides }:
{ lib, stdenv, python3, pkgs, fetchFromGitHub }: { lib, python3, fetchFromGitHub, wrapQtAppsHook }:
let let
defaultOverrides = commonOverrides ++ [ defaultOverrides = commonOverrides ++ [
@ -20,16 +20,20 @@ in python.pkgs.buildPythonPackage rec {
sha256 = sha256Hash; sha256 = sha256Hash;
}; };
nativeBuildInputs = [ wrapQtAppsHook ];
propagatedBuildInputs = with python.pkgs; [ propagatedBuildInputs = with python.pkgs; [
sentry-sdk psutil jsonschema # tox for check sentry-sdk psutil jsonschema # tox for check
# Runtime dependencies # Runtime dependencies
sip (pyqt5.override { withWebSockets = true; }) distro setuptools sip (pyqt5.override { withWebSockets = true; }) distro setuptools
pkgs.qt5Full
]; ];
doCheck = false; # Failing 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)"; description = "Graphical Network Simulator 3 GUI (${branch} release)";
longDescription = '' longDescription = ''
Graphical user interface for controlling the GNS3 network simulator. This Graphical user interface for controlling the GNS3 network simulator. This