about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2023-12-23 14:52:27 -0500
committerGitHub <noreply@github.com>2023-12-23 14:52:27 -0500
commitd8aba6fe4067abdd8b1a7f398f2b90f21c608530 (patch)
tree3408d643935a14588ffa0ae091f875e7e38c660f
parent250be87c164a89590eabd950564addc7db571ffe (diff)
parent898c9a7ce6a915b22975a2ec72cf7d3a0f307b33 (diff)
downloadnixlib-d8aba6fe4067abdd8b1a7f398f2b90f21c608530.tar
nixlib-d8aba6fe4067abdd8b1a7f398f2b90f21c608530.tar.gz
nixlib-d8aba6fe4067abdd8b1a7f398f2b90f21c608530.tar.bz2
nixlib-d8aba6fe4067abdd8b1a7f398f2b90f21c608530.tar.lz
nixlib-d8aba6fe4067abdd8b1a7f398f2b90f21c608530.tar.xz
nixlib-d8aba6fe4067abdd8b1a7f398f2b90f21c608530.tar.zst
nixlib-d8aba6fe4067abdd8b1a7f398f2b90f21c608530.zip
Merge pull request #276038 from pete3n/update-kismet
kismet: fix cross compilation
-rw-r--r--pkgs/applications/networking/sniffers/kismet/default.nix29
1 files changed, 16 insertions, 13 deletions
diff --git a/pkgs/applications/networking/sniffers/kismet/default.nix b/pkgs/applications/networking/sniffers/kismet/default.nix
index f874db1e98d8..4008c5121c9e 100644
--- a/pkgs/applications/networking/sniffers/kismet/default.nix
+++ b/pkgs/applications/networking/sniffers/kismet/default.nix
@@ -1,5 +1,6 @@
 { lib
 , stdenv
+, autoreconfHook
 , binutils
 , elfutils
 , fetchurl
@@ -20,7 +21,7 @@
 , python3
 , sqlite
 , withNetworkManager ? false
-, withPython ? true
+, withPython ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
 , withSensors ? false
 , zlib
 }:
@@ -37,6 +38,8 @@ stdenv.mkDerivation rec {
   postPatch = ''
     substituteInPlace Makefile.in \
       --replace "-m 4550" ""
+    substituteInPlace configure.ac \
+      --replace "pkg-config" "$PKG_CONFIG"
   '';
 
   postConfigure = ''
@@ -47,10 +50,21 @@ stdenv.mkDerivation rec {
         -i Makefile
   '';
 
+  strictDeps = true;
+
   nativeBuildInputs = [
+    autoreconfHook
     pkg-config
+    protobuf
+    protobufc
   ] ++ lib.optionals withPython [
-    python3
+    (python3.withPackages (ps: [
+      ps.numpy
+      ps.protobuf
+      ps.pyserial
+      ps.setuptools
+      ps.websockets
+    ]))
   ];
 
   buildInputs = [
@@ -75,17 +89,6 @@ stdenv.mkDerivation rec {
     lm_sensors
   ];
 
-  propagatedBuildInputs = [
-  ] ++ lib.optionals withPython [
-    (python3.withPackages (ps: [
-      ps.numpy
-      ps.protobuf
-      ps.pyserial
-      ps.setuptools
-      ps.websockets
-    ]))
-  ];
-
   configureFlags = [
     "--disable-wifi-coconut"  # Until https://github.com/kismetwireless/kismet/issues/478
   ] ++ lib.optionals (!withNetworkManager) [