Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wireshark: build with QT 6 #230307

Merged
merged 1 commit into from
May 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pkgs/applications/networking/sniffers/wireshark/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
, makeWrapper
, wrapGAppsHook
, withQt ? true
, qt5 ? null
, qt6 ? null
, ApplicationServices
, SystemConfiguration
, gmp
, asciidoctor
}:

assert withQt -> qt5 != null;
assert withQt -> qt6 != null;

let
version = "4.0.5";
Expand All @@ -70,6 +70,7 @@ stdenv.mkDerivation {
# Fix `extcap` and `plugins` paths. See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=16444
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DLEMON_C_COMPILER=cc"
"-DUSE_qt6=ON"
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"-DHAVE_C99_VSNPRINTF_EXITCODE=0"
"-DHAVE_C99_VSNPRINTF_EXITCODE__TRYRUN_OUTPUT="
Expand All @@ -79,7 +80,7 @@ stdenv.mkDerivation {
env.NIX_CFLAGS_COMPILE = toString [ "-DQT_NO_DEBUG" ];

nativeBuildInputs = [ asciidoctor bison cmake ninja flex makeWrapper pkg-config python3 perl ]
++ lib.optionals withQt [ qt5.wrapQtAppsHook wrapGAppsHook ];
++ lib.optionals withQt [ qt6.wrapQtAppsHook wrapGAppsHook ];

depsBuildBuild = [ buildPackages.stdenv.cc ];

Expand Down Expand Up @@ -108,11 +109,10 @@ stdenv.mkDerivation {
c-ares
glib
zlib
] ++ lib.optionals withQt (with qt5; [ qtbase qtmultimedia qtsvg qttools ])
++ lib.optionals (withQt && stdenv.isLinux) [ qt5.qtwayland ]
] ++ lib.optionals withQt (with qt6; [ qtbase qtmultimedia qtsvg qttools qt5compat ])
++ lib.optionals (withQt && stdenv.isLinux) [ qt6.qtwayland ]
++ lib.optionals stdenv.isLinux [ libcap libnl sbc ]
++ lib.optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ]
++ lib.optionals (withQt && stdenv.isDarwin) (with qt5; [ qtmacextras ]);
++ lib.optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ];

strictDeps = true;

Expand Down