Files
nixpkgs/pkgs/by-name/ki/kismet/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

133 lines
2.4 KiB
Nix

{
lib,
stdenv,
autoreconfHook,
binutils,
elfutils,
fetchFromGitHub,
glib,
libcap,
libmicrohttpd,
libnl,
libpcap,
libusb1,
libwebsockets,
lm_sensors,
networkmanager,
nix-update-script,
nixosTests,
pcre2,
pkg-config,
openssl,
protobuf,
protobufc,
python3,
sqlite,
withNetworkManager ? false,
withPython ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
withSensors ? false,
zlib,
}:
stdenv.mkDerivation (finalPackage: {
pname = "kismet";
version = "2023-07-R2";
src = fetchFromGitHub {
owner = "kismetwireless";
repo = "kismet";
tag = "kismet-${finalPackage.version}";
hash = "sha256-QwTjjZHnrlATFvHK9PLDTt76UjfZdzCmV6uXVgIMIYg=";
};
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
libcap
libmicrohttpd
libnl
libpcap
openssl
libusb1
libwebsockets
pcre2
protobuf
protobufc
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 ];
};
})