wireshark: Add Bluetooth

Only applies to Linux
This commit is contained in:
Justin Gerhardt 2020-06-04 02:29:38 -04:00 committed by Bjørn Forsman
parent f2d1568282
commit 9930b8fd3d
2 changed files with 11 additions and 8 deletions

View file

@ -12,6 +12,7 @@ with stdenv.lib;
let
version = "3.2.4";
variant = if withQt then "qt" else "cli";
pcap = libpcap.override { withBluez = stdenv.isLinux; };
in stdenv.mkDerivation {
pname = "wireshark-${variant}";
@ -35,7 +36,7 @@ in stdenv.mkDerivation {
] ++ optional withQt qt5.wrapQtAppsHook;
buildInputs = [
gettext pcre perl libpcap lua5 libssh nghttp2 openssl libgcrypt
gettext pcre perl pcap lua5 libssh nghttp2 openssl libgcrypt
libgpgerror gnutls geoip c-ares python3 glib zlib makeWrapper
] ++ optionals withQt (with qt5; [ qtbase qtmultimedia qtsvg qttools ])
++ optionals stdenv.isLinux [ libcap libnl ]

View file

@ -1,4 +1,6 @@
{ stdenv, fetchurl, flex, bison }:
{ stdenv, fetchurl, flex, bison, bluez, pkgconfig, withBluez ? false }:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "libpcap";
@ -9,7 +11,8 @@ stdenv.mkDerivation rec {
sha256 = "153h1378diqyc27jjgz6gg5nxmb4ddk006d9xg69nqavgiikflk3";
};
nativeBuildInputs = [ flex bison ];
nativeBuildInputs = [ flex bison ]
++ optionals withBluez [ bluez.dev pkgconfig ];
# We need to force the autodetection because detection doesn't
# work in pure build enviroments.
@ -18,17 +21,16 @@ stdenv.mkDerivation rec {
linux = "linux";
darwin = "bpf";
}.${stdenv.hostPlatform.parsed.kernel.name})
] ++ stdenv.lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
"ac_cv_linux_vers=2"
];
] ++ optionals (stdenv.hostPlatform == stdenv.buildPlatform)
[ "ac_cv_linux_vers=2" ];
dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
prePatch = optionalString stdenv.isDarwin ''
substituteInPlace configure --replace " -arch i386" ""
'';
meta = with stdenv.lib; {
meta = {
homepage = "https://www.tcpdump.org";
description = "Packet Capture Library";
platforms = platforms.unix;