2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, libpcap, pcre, libnl, zlib, libmicrohttpd
|
2020-05-03 14:19:19 +01:00
|
|
|
, 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;
|
2009-02-01 21:21:27 +00:00
|
|
|
|
2013-09-07 13:46:53 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "kismet";
|
2020-09-13 19:53:16 +01:00
|
|
|
version = "2020-09-R2";
|
2009-02-01 21:21:27 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://www.kismetwireless.net/code/${pname}-${version}.tar.xz";
|
2020-09-13 19:53:16 +01:00
|
|
|
sha256 = "1n6y6sgqf50bng8n0mhs2r1w0ak14mv654sqay72a78wh2s7ywzg";
|
2009-02-01 21:21:27 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-05-03 14:19:19 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libpcap pcre libmicrohttpd libnl zlib sqlite protobuf protobufc
|
|
|
|
libusb1 libcap binutils elfutils
|
2021-01-15 13:21:58 +00:00
|
|
|
] ++ lib.optionals withNetworkManager [ networkmanager glib ]
|
|
|
|
++ lib.optional withSensors lm_sensors
|
|
|
|
++ lib.optional withPython (python3.withPackages(ps: [ ps.setuptools ps.protobuf
|
2020-05-03 14:19:19 +01:00
|
|
|
ps.numpy ps.pyserial ]));
|
|
|
|
|
|
|
|
configureFlags = []
|
2021-01-15 13:21:58 +00:00
|
|
|
++ lib.optional (!withNetworkManager) "--disable-libnm"
|
|
|
|
++ lib.optional (!withPython) "--disable-python-tools"
|
|
|
|
++ lib.optional (!withSensors) "--disable-lmsensors";
|
2020-05-03 14:19:19 +01:00
|
|
|
|
2013-09-07 13:46:53 +01:00
|
|
|
postConfigure = ''
|
|
|
|
sed -e 's/-o $(INSTUSR)//' \
|
|
|
|
-e 's/-g $(INSTGRP)//' \
|
|
|
|
-e 's/-g $(MANGRP)//' \
|
|
|
|
-e 's/-g $(SUIDGROUP)//' \
|
|
|
|
-i Makefile
|
|
|
|
'';
|
2009-02-01 21:21:27 +00:00
|
|
|
|
2020-05-03 14:19:19 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2009-02-01 21:21:27 +00:00
|
|
|
description = "Wireless network sniffer";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.kismetwireless.net/";
|
2017-09-05 13:01:20 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2009-02-01 21:21:27 +00:00
|
|
|
};
|
|
|
|
}
|