kismet: 2020-09-R2 -> 2022-08-R1

This commit is contained in:
Fabian Affolter 2022-11-09 09:22:33 +01:00
parent 3a835b51ef
commit c0ce9be646

View file

@ -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;
};
}