···
5
+
, ApplicationServices
42
+
, SystemConfiguration
43
-
, ApplicationServices
44
-
, SystemConfiguration
assert withQt -> qt6 != null;
53
-
variant = if withQt then "qt" else "cli";
55
-
stdenv.mkDerivation {
56
-
pname = "wireshark-${variant}";
53
+
stdenv.mkDerivation rec {
54
+
pname = "wireshark-${if withQt then "qt" else "cli"}";
outputs = [ "out" "dev" ];
64
-
hash = "sha256-bNg0yhNb1GRsTclNWWO+Bamm2wOnUjVKU+JftJu+LTo=";
63
+
hash = "sha256-R8CoatIZC7vkKn4UZ3G7h5qBexfKMdJJ0swi+IxAjG0=";
68
-
"-DBUILD_wireshark=${if withQt then "ON" else "OFF"}"
69
-
"-DENABLE_APPLICATION_BUNDLE=${if withQt && stdenv.isDarwin then "ON" else "OFF"}"
70
-
# Fix `extcap` and `plugins` paths. See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=16444
71
-
"-DCMAKE_INSTALL_LIBDIR=lib"
72
-
"-DLEMON_C_COMPILER=cc"
74
-
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
75
-
"-DHAVE_C99_VSNPRINTF_EXITCODE=0"
76
-
"-DHAVE_C99_VSNPRINTF_EXITCODE__TRYRUN_OUTPUT="
67
+
./wireshark-lookup-dumpcap-in-path.patch
79
-
# Avoid referencing -dev paths because of debug assertions.
80
-
env.NIX_CFLAGS_COMPILE = toString [ "-DQT_NO_DEBUG" ];
70
+
depsBuildBuild = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
71
+
buildPackages.stdenv.cc
82
-
nativeBuildInputs = [ asciidoctor bison cmake ninja flex makeWrapper pkg-config python3 perl ]
83
-
++ lib.optionals withQt [ qt6.wrapQtAppsHook wrapGAppsHook ];
85
-
depsBuildBuild = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ buildPackages.stdenv.cc ];
74
+
nativeBuildInputs = [
84
+
] ++ lib.optionals withQt [
···
112
-
] ++ lib.optionals withQt (with qt6; [ qtbase qtmultimedia qtsvg qttools qt5compat ])
113
-
++ lib.optionals (withQt && stdenv.isLinux) [ qt6.qtwayland ]
114
-
++ lib.optionals stdenv.isLinux [ libcap libnl sbc ]
115
-
++ lib.optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ];
114
+
] ++ lib.optionals withQt (with qt6; [
120
+
]) ++ lib.optionals (withQt && stdenv.isLinux) [
122
+
] ++ lib.optionals stdenv.isLinux [
126
+
] ++ lib.optionals stdenv.isDarwin [
127
+
ApplicationServices
129
+
SystemConfiguration
119
-
patches = [ ./wireshark-lookup-dumpcap-in-path.patch ];
135
+
"-DBUILD_wireshark=${if withQt then "ON" else "OFF"}"
136
+
"-DENABLE_APPLICATION_BUNDLE=${if withQt && stdenv.isDarwin then "ON" else "OFF"}"
137
+
# Fix `extcap` and `plugins` paths. See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=16444
138
+
"-DCMAKE_INSTALL_LIBDIR=lib"
139
+
"-DLEMON_C_COMPILER=cc"
141
+
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
142
+
"-DHAVE_C99_VSNPRINTF_EXITCODE=0"
143
+
"-DHAVE_C99_VSNPRINTF_EXITCODE__TRYRUN_OUTPUT="
146
+
# Avoid referencing -dev paths because of debug assertions.
147
+
env.NIX_CFLAGS_COMPILE = toString [ "-DQT_NO_DEBUG" ];
149
+
dontFixCmake = true;
150
+
# Prevent double-wrapping, inject wrapper args manually instead.
151
+
dontWrapGApps = true;
154
+
# to be able to run the resulting binary
155
+
export WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1
sed -i -e '1i cmake_policy(SET CMP0025 NEW)' CMakeLists.txt
···
cp ../wsutil/wmem/*.h $dev/include/wsutil/wmem/
154
-
dontFixCmake = true;
156
-
# Prevent double-wrapping, inject wrapper args manually instead.
157
-
dontWrapGApps = true;
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
163
-
# to be able to run the resulting binary
164
-
export WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1
168
-
homepage = "https://www.wireshark.org/";
169
-
changelog = "https://www.wireshark.org/docs/relnotes/wireshark-${version}.html";
description = "Powerful network protocol analyzer";
171
-
license = licenses.gpl2Plus;
Wireshark (formerly known as "Ethereal") is a powerful network
protocol analyzer developed by an international team of networking
experts. It runs on UNIX, macOS and Windows.
202
+
homepage = "https://www.wireshark.org";
203
+
changelog = "https://www.wireshark.org/docs/relnotes/wireshark-${version}.html";
204
+
license = licenses.gpl2Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ bjornfor fpletz paveloom ];
mainProgram = if withQt then "wireshark" else "tshark";