From f30b55a46f98ff2c811056bbc260fcc16b76fee4 Mon Sep 17 00:00:00 2001 From: Janik Haag Date: Sun, 26 Apr 2026 13:53:14 +0200 Subject: [PATCH] wireshark: ln ext bins to $out for discoverability This change shouldn't increase the closure size except for a few bytes for the symlinks, since the binaries are already included in the package anyway. And it will cause e.g. androiddump to appear on https://search.nixos.org/ while also adding all the extcap binaries to your path when using wireshark from a nix-shell. The change is guarded behind a optional flag for stdenv.hostPlatform.isLinux, because darwin doesn't appear to ship the extra bins. I don't currently have a darwin system on hand for testing, but used: ```bash curl https://cache.nixos.org/nar/0m8147jar72c94gs1ryfrigiiq0gn52dqpw3f3bbnp0rhk3xb4q4.nar.xz -o /tmp/wireshark.nar.xz cat wireshark.nar.xz | xz -dc | nix-store --restore /tmp/darwin-wireshark tree /tmp/darwin-wireshark ``` to check that this is the case. The CNO url was derived from https://cache.nixos.org/iy72vcwvwd2inhsmqvpsi451fph85gzi.narinfo by looking at the latest build results of wireshark from HNO for aarch64-darwin. --- pkgs/by-name/wi/wireshark/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/wi/wireshark/package.nix b/pkgs/by-name/wi/wireshark/package.nix index fe93c80535cd..cead674dc6ac 100644 --- a/pkgs/by-name/wi/wireshark/package.nix +++ b/pkgs/by-name/wi/wireshark/package.nix @@ -52,6 +52,7 @@ withQt ? true, qt6, libpcap' ? libpcap.override { withBluez = stdenv.hostPlatform.isLinux; }, + withExtras ? stdenv.hostPlatform.isLinux, }: let isAppBundle = withQt && stdenv.hostPlatform.isDarwin; @@ -185,6 +186,9 @@ stdenv.mkDerivation (finalAttrs: { postInstall = '' cmake --install . --prefix "''${!outputDev}" --component Development '' + + lib.optionalString withExtras '' + ln -s $out/libexec/wireshark/extcap/* -t $out/bin/ + '' + lib.optionalString isAppBundle '' mkdir -p $out/Applications mv $out/bin/Wireshark.app $out/Applications/Wireshark.app