From 5e872fd3a33e0adb69428bf3d0912009ca83dbcf Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Tue, 1 Apr 2025 20:23:48 -0700 Subject: [PATCH] kismet: 2023-07-R1 -> 2023-07-R2; adopt This is a security release. Enable the update script while we're at it. Switch to GH for releases. Switch to pcre2 since there are startup warnings with the old pcre. --- pkgs/by-name/ki/kismet/package.nix | 41 ++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/ki/kismet/package.nix b/pkgs/by-name/ki/kismet/package.nix index 0662a1b5e97f..9bb47dc7c7ca 100644 --- a/pkgs/by-name/ki/kismet/package.nix +++ b/pkgs/by-name/ki/kismet/package.nix @@ -4,7 +4,7 @@ autoreconfHook, binutils, elfutils, - fetchurl, + fetchFromGitHub, glib, libcap, libmicrohttpd, @@ -14,7 +14,8 @@ libwebsockets, lm_sensors, networkmanager, - pcre, + nix-update-script, + pcre2, pkg-config, openssl, protobuf, @@ -27,20 +28,22 @@ zlib, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalPackage: { pname = "kismet"; - version = "2023-07-R1"; + version = "2023-07-R2"; - src = fetchurl { - url = "https://www.kismetwireless.net/code/${pname}-${version}.tar.xz"; - hash = "sha256-8IVI4mymX6HlZ7Heu+ocpNDnIGvduWpPY5yQFxhz6Pc="; + src = fetchFromGitHub { + owner = "kismetwireless"; + repo = "kismet"; + tag = "kismet-${finalPackage.version}"; + hash = "sha256-QwTjjZHnrlATFvHK9PLDTt76UjfZdzCmV6uXVgIMIYg="; }; postPatch = '' substituteInPlace Makefile.in \ - --replace "-m 4550" "" + --replace-fail "-m 4550" "" substituteInPlace configure.ac \ - --replace "pkg-config" "$PKG_CONFIG" + --replace-fail "pkg-config" "$PKG_CONFIG" ''; postConfigure = '' @@ -81,7 +84,7 @@ stdenv.mkDerivation rec { openssl libusb1 libwebsockets - pcre + pcre2 protobuf protobufc sqlite @@ -111,10 +114,20 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with lib; { + passthru = { + updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "^kismet-(\\d+-\\d+-.+)$" + ]; + }; + }; + + meta = { description = "Wireless network sniffer"; homepage = "https://www.kismetwireless.net/"; - license = licenses.gpl3Plus; - platforms = platforms.linux; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ numinit ]; }; -} +})