23 lines
601 B
Nix
23 lines
601 B
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
extcap = ./extcap;
|
|
pythonWithPackages = pkgs.python3.withPackages (pp: with pp; [
|
|
pyserial
|
|
psutil
|
|
]);
|
|
nrf_sniffer_ble = pkgs.writeShellScript "nrf_sniffer_ble" ''
|
|
script_path=$(dirname `which $0`)
|
|
|
|
exec ${pythonWithPackages}/bin/python3 $script_path/nrf_sniffer_ble.py "$@"
|
|
'';
|
|
in
|
|
lib.mkIf config.jalr.gui.enable {
|
|
programs.wireshark = {
|
|
enable = true;
|
|
package = pkgs.wireshark.overrideAttrs (o: {
|
|
postInstall = ''
|
|
cp -r ${extcap}/* ${nrf_sniffer_ble} $out/lib/wireshark/extcap
|
|
'' + o.postInstall;
|
|
});
|
|
};
|
|
}
|