about summary refs log tree commit diff
path: root/pkgs/applications/networking/sniffers
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2022-11-19 10:15:12 +0100
committerGitHub <noreply@github.com>2022-11-19 10:15:12 +0100
commit27b65f89dc74244175ac442d8790cdae78418544 (patch)
treeb42c031455b03d287b44342c150bf7c174d78534 /pkgs/applications/networking/sniffers
parenteb9779c585d55e364ffa9ce0286d6fa3abddd3cd (diff)
parentc0ce9be646d6109d1352c6e38c1b41d085c009aa (diff)
downloadnixlib-27b65f89dc74244175ac442d8790cdae78418544.tar
nixlib-27b65f89dc74244175ac442d8790cdae78418544.tar.gz
nixlib-27b65f89dc74244175ac442d8790cdae78418544.tar.bz2
nixlib-27b65f89dc74244175ac442d8790cdae78418544.tar.lz
nixlib-27b65f89dc74244175ac442d8790cdae78418544.tar.xz
nixlib-27b65f89dc74244175ac442d8790cdae78418544.tar.zst
nixlib-27b65f89dc74244175ac442d8790cdae78418544.zip
Merge pull request #200350 from fabaff/kismet-bump
kismet: 2020-09-R2 -> 2022-08-R1
Diffstat (limited to 'pkgs/applications/networking/sniffers')
-rw-r--r--pkgs/applications/networking/sniffers/kismet/default.nix105
1 files changed, 79 insertions, 26 deletions
diff --git a/pkgs/applications/networking/sniffers/kismet/default.nix b/pkgs/applications/networking/sniffers/kismet/default.nix
index ad1ee0a0b302..1e4bb853742e 100644
--- a/pkgs/applications/networking/sniffers/kismet/default.nix
+++ b/pkgs/applications/networking/sniffers/kismet/default.nix
@@ -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;
   };
 }