From 9930b8fd3d98a6d44c4518a10056ee0b9f0866fc Mon Sep 17 00:00:00 2001 From: Justin Gerhardt Date: Thu, 4 Jun 2020 02:29:38 -0400 Subject: wireshark: Add Bluetooth Only applies to Linux --- .../networking/sniffers/wireshark/default.nix | 3 ++- pkgs/development/libraries/libpcap/default.nix | 16 +++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'pkgs') diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index 7166ebe93d71..c6dc66a0ca78 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -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 ] diff --git a/pkgs/development/libraries/libpcap/default.nix b/pkgs/development/libraries/libpcap/default.nix index 123c2f2f0676..35cf4485f72e 100644 --- a/pkgs/development/libraries/libpcap/default.nix +++ b/pkgs/development/libraries/libpcap/default.nix @@ -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; -- cgit 1.4.1