3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/sniffers/kismet/default.nix

52 lines
1.6 KiB
Nix
Raw Normal View History

{ 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;
stdenv.mkDerivation rec {
pname = "kismet";
2020-09-13 19:53:16 +01:00
version = "2020-09-R2";
src = fetchurl {
url = "https://www.kismetwireless.net/code/${pname}-${version}.tar.xz";
2020-09-13 19:53:16 +01:00
sha256 = "1n6y6sgqf50bng8n0mhs2r1w0ak14mv654sqay72a78wh2s7ywzg";
};
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
postConfigure = ''
sed -e 's/-o $(INSTUSR)//' \
-e 's/-g $(INSTGRP)//' \
-e 's/-g $(MANGRP)//' \
-e 's/-g $(SUIDGROUP)//' \
-i Makefile
'';
2020-05-03 14:19:19 +01:00
enableParallelBuilding = true;
meta = with lib; {
description = "Wireless network sniffer";
homepage = "https://www.kismetwireless.net/";
2017-09-05 13:01:20 +01:00
license = licenses.gpl3;
platforms = platforms.linux;
};
}