diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index 49bf77a483c2d..94bbb480663f5 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -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"; @@ -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=" @@ -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 ]; @@ -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;