Files
nixpkgs/pkgs/by-name/ki/kismet/package.nix
quantenzitrone 44560ee9f7 various: make all uses of fixed point builders use finalAttrs as argument
some of these were just typos like `finalAttr`, `finalAtts` or `finaAttrs`
some of these were using `self`, `final`, `finalPackage`, `attrs` or `_`
some of these were wrong by using `oldAttrs` or `finalPackages`

other than the nixos manual this shouldn't create any rebuilds
2026-02-06 23:22:29 +01:00

139 lines
2.5 KiB
Nix

{
lib,
stdenv,
autoreconfHook,
binutils,
elfutils,
fetchFromGitHub,
glib,
libbtbb,
libcap,
libmicrohttpd,
libnl,
libpcap,
libusb1,
libwebsockets,
lm_sensors,
mosquitto,
networkmanager,
nix-update-script,
nixosTests,
pcre2,
pkg-config,
openssl,
protobuf,
protobufc,
python3,
rtl-sdr-librtlsdr,
sqlite,
withNetworkManager ? false,
withPython ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
withSensors ? false,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "kismet";
version = "2025-09-R1";
src = fetchFromGitHub {
owner = "kismetwireless";
repo = "kismet";
tag = "kismet-${finalAttrs.version}";
hash = "sha256-bwgeBIa5P1he0azWBu1YTXS9EGlHdJK8hS6A5Rj9XU4=";
};
postPatch = ''
substituteInPlace Makefile.in \
--replace-fail "-m 4550" ""
substituteInPlace configure.ac \
--replace-fail "pkg-config" "$PKG_CONFIG"
'';
postConfigure = ''
sed -e 's/-o $(INSTUSR)//' \
-e 's/-g $(INSTGRP)//' \
-e 's/-g $(MANGRP)//' \
-e 's/-g $(SUIDGROUP)//' \
-i Makefile
'';
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
pkg-config
protobuf
protobufc
]
++ lib.optionals withPython [
(python3.withPackages (ps: [
ps.numpy
ps.protobuf
ps.pyserial
ps.setuptools
ps.websockets
]))
];
buildInputs = [
binutils
elfutils
libbtbb
libcap
libmicrohttpd
libnl
libpcap
openssl
libusb1
libwebsockets
mosquitto
pcre2
protobuf
protobufc
rtl-sdr-librtlsdr
sqlite
zlib
]
++ lib.optionals withNetworkManager [
networkmanager
glib
]
++ lib.optionals withSensors [
lm_sensors
];
configureFlags = [
"--disable-wifi-coconut" # Until https://github.com/kismetwireless/kismet/issues/478
]
++ lib.optionals (!withNetworkManager) [
"--disable-libnm"
]
++ lib.optionals (!withPython) [
"--disable-python-tools"
]
++ lib.optionals (!withSensors) [
"--disable-lmsensors"
];
enableParallelBuilding = true;
passthru = {
tests.kismet = nixosTests.kismet;
updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"^kismet-(\\d+-\\d+-.+)$"
];
};
};
meta = {
description = "Wireless network sniffer";
homepage = "https://www.kismetwireless.net/";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ numinit ];
};
})