From af62dc53559c419d570df5bf9367a2e5d0c2a1d4 Mon Sep 17 00:00:00 2001 From: snicket2100 <57048005+snicket2100@users.noreply.github.com> Date: Sun, 3 May 2020 15:19:19 +0200 Subject: [PATCH] kismet: 2016-07-R1 -> 2020-04-R2 --- .../networking/sniffers/kismet/default.nix | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/sniffers/kismet/default.nix b/pkgs/applications/networking/sniffers/kismet/default.nix index 9775486c156a..93ccf254a3a4 100644 --- a/pkgs/applications/networking/sniffers/kismet/default.nix +++ b/pkgs/applications/networking/sniffers/kismet/default.nix @@ -1,16 +1,37 @@ -{ stdenv, fetchurl, pkgconfig, libpcap, ncurses, expat, pcre, libnl }: +{ stdenv, fetchurl, pkgconfig, libpcap, pcre, libnl, zlib, libmicrohttpd +, sqlite, protobuf, protobufc, libusb1, libcap, binutils, elfutils +, withNetworkManager ? false, glib, networkmanager +, withPython ? false, python3 +, withSensors ? false, lm_sensors}: + +# couldn't get python modules to build correctly, +# waiting for some other volunteer to fix it +assert !withPython; stdenv.mkDerivation rec { pname = "kismet"; - version = "2016-07-R1"; + version = "2020-04-R2"; src = fetchurl { url = "https://www.kismetwireless.net/code/${pname}-${version}.tar.xz"; - sha256 = "0dz28y4ay4lskhl0lawqy2dkcrhgfkbg06v22qxzzw8i6caizcmx"; + sha256 = "0hxmaln0y6bk9m1rshr4swmg0sqy3ic693vfk8haj7f5gnph96cm"; }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ libpcap ncurses expat pcre libnl ]; + + buildInputs = [ + libpcap pcre libmicrohttpd libnl zlib sqlite protobuf protobufc + libusb1 libcap binutils elfutils + ] ++ stdenv.lib.optionals withNetworkManager [ networkmanager glib ] + ++ stdenv.lib.optional withSensors lm_sensors + ++ stdenv.lib.optional withPython (python3.withPackages(ps: [ ps.setuptools ps.protobuf + ps.numpy ps.pyserial ])); + + configureFlags = [] + ++ stdenv.lib.optional (!withNetworkManager) "--disable-libnm" + ++ stdenv.lib.optional (!withPython) "--disable-python-tools" + ++ stdenv.lib.optional (!withSensors) "--disable-lmsensors"; + postConfigure = '' sed -e 's/-o $(INSTUSR)//' \ -e 's/-g $(INSTGRP)//' \ @@ -19,6 +40,8 @@ stdenv.mkDerivation rec { -i Makefile ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "Wireless network sniffer"; homepage = "https://www.kismetwireless.net/";