Skip to content

Commit

Permalink
wireshark-extcap: fix darwin usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mrene committed Aug 10, 2024
1 parent 8de6878 commit d8e531b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pkgs/default/wireshark-extcap/package.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ lib
, stdenv
, wireshark
, symlinkJoin
, makeWrapper
Expand Down Expand Up @@ -35,6 +36,18 @@ symlinkJoin {
for file in $out/bin/*; do
wrapProgram $file --prefix WIRESHARK_EXTCAP_DIR : ${onlyBin extCapDir}/bin
done
'' + lib.optionalString stdenv.isDarwin ''
for file in $out/Applications/Wireshark.app/Contents/MacOS/*; do
if [[ -f $file ]]; then
wrapProgram $file --prefix WIRESHARK_EXTCAP_DIR : ${onlyBin extCapDir}/bin
fi
done
'';
meta = wireshark.meta;
meta = wireshark.meta // {
mainProgram = if stdenv.isDarwin then
# Ugly hack but it makes `nix run` work on macOS
"../Applications/Wireshark.app/Contents/MacOS/Wireshark"
else
wireshark.meta.mainProgram;
};
}

0 comments on commit d8e531b

Please sign in to comment.