From c0ce9be646d6109d1352c6e38c1b41d085c009aa Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 9 Nov 2022 09:22:33 +0100 Subject: kismet: 2020-09-R2 -> 2022-08-R1 --- .../networking/sniffers/kismet/default.nix | 105 ++++++++++++++++----- 1 file changed, 79 insertions(+), 26 deletions(-) (limited to 'pkgs/applications/networking/sniffers') diff --git a/pkgs/applications/networking/sniffers/kismet/default.nix b/pkgs/applications/networking/sniffers/kismet/default.nix index ad1ee0a0b302..1e4bb853742e 100644 --- a/pkgs/applications/networking/sniffers/kismet/default.nix +++ b/pkgs/applications/networking/sniffers/kismet/default.nix @@ -1,36 +1,43 @@ -{ lib, stdenv, fetchurl, pkg-config, 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; +{ lib +, stdenv +, binutils +, elfutils +, fetchurl +, glib +, libcap +, libmicrohttpd +, libnl +, libpcap +, libusb1 +, libwebsockets +, lm_sensors +, networkmanager +, pcre +, pkg-config +, openssl +, protobuf +, protobufc +, python3 +, sqlite +, withNetworkManager ? false +, withPython ? true +, withSensors ? false +, zlib +}: stdenv.mkDerivation rec { pname = "kismet"; - version = "2020-09-R2"; + version = "2022-08-R1"; src = fetchurl { url = "https://www.kismetwireless.net/code/${pname}-${version}.tar.xz"; - sha256 = "1n6y6sgqf50bng8n0mhs2r1w0ak14mv654sqay72a78wh2s7ywzg"; + hash = "sha256-IUnM6sVSZQhlP00C3PemlOPaPcAAojcqHuS/mYgnl4E="; }; - nativeBuildInputs = [ pkg-config ]; - - buildInputs = [ - libpcap pcre libmicrohttpd libnl zlib sqlite protobuf protobufc - libusb1 libcap binutils elfutils - ] ++ lib.optionals withNetworkManager [ networkmanager glib ] - ++ lib.optional withSensors lm_sensors - ++ lib.optional withPython (python3.withPackages(ps: [ ps.setuptools ps.protobuf - ps.numpy ps.pyserial ])); - - configureFlags = [] - ++ lib.optional (!withNetworkManager) "--disable-libnm" - ++ lib.optional (!withPython) "--disable-python-tools" - ++ lib.optional (!withSensors) "--disable-lmsensors"; + postPatch = '' + substituteInPlace Makefile.in \ + --replace "-m 4550" "" + ''; postConfigure = '' sed -e 's/-o $(INSTUSR)//' \ @@ -40,12 +47,58 @@ stdenv.mkDerivation rec { -i Makefile ''; + nativeBuildInputs = [ + pkg-config + ] ++ lib.optionals withPython [ + python3 + ]; + + buildInputs = [ + binutils + elfutils + libcap + libmicrohttpd + libnl + libpcap + openssl + libusb1 + libwebsockets + pcre + protobuf + protobufc + sqlite + zlib + ] ++ lib.optionals withNetworkManager [ + networkmanager + glib + ] ++ lib.optional withSensors [ + lm_sensors + ]; + + propagatedBuildInputs = [ + ] ++ lib.optional withPython (python3.withPackages (ps: [ + ps.numpy + ps.protobuf + ps.pyserial + ps.setuptools + ps.websockets + ])); + + configureFlags = [ + ] ++ lib.optional (!withNetworkManager) [ + "--disable-libnm" + ] ++ lib.optional (!withPython) [ + "--disable-python-tools" + ] ++ lib.optional (!withSensors) [ + "--disable-lmsensors" + ]; + enableParallelBuilding = true; meta = with lib; { description = "Wireless network sniffer"; homepage = "https://www.kismetwireless.net/"; - license = licenses.gpl3; + license = licenses.gpl3Plus; platforms = platforms.linux; }; } -- cgit 1.4.1