Change:
I installed wireshark on MacOS with Now when I'm trying to start it from UI it's not starting UI and I need to close it with force quit. When I run it from bash with I see: So looks like it can't find lib directory. MacOS version is Big Sur I'm junior nixpkgs user, so it's possible that I do something wrong. In this case can you please tell me what I need to do to make it working.
I have the same issue: <details<summaryenvinfo</summary</detailsBelow are reports from <details<summaryandroiddump</summary</details<details<summaryciscodump</summary</details<details<summaryrandpktdump</summary</details<details<summarysshdump</summary</details<details<summaryudpdump</summary</detailsHope this helps. EDIT:
Based on my brief investigation, I noted the following issues (see diff/patch at the bottom): regex syntax in awk . I had to add for compilation to proceed . I had to add for compilation to proceed. For issue number 3, I noted that when using the latest zstd version I encountered a make error immediately. Based on this , I changed the zstd version to . It compiled for more than 6 hours, and I was preparing to create a pull request. Unfortuately it reached an error!!!: I'm not really sure how to debug this further. <details<summarydiff/patch</summary</details
Hey, are you still interested in this ? If you are, I'd be happy to help you get this over the line. I have a darwin machine and I don't mind running the build before I go to sleep to test.
, it would be great to have it working. I believe I need to find some time to figure out what you are going to do. :) If you have links to any resources that will help me to understand how it works, can you write them, please? I know I can read through documentation. I just didn't have time for this yet.
I think the way to go here is open a PR with the fix about the awk expression, then test and check the error. If you want to open a PR, I'm happy to test, post the error and we can discuss the fixes possible on the PR. I think there where quite some updates since this issue, so that's why the dependency proposed need to be checked again (snappy and zstd). I don't know at all how it works, I wanted to test today. I'm hoping the errors will be clear enough.
I marked this as stale due to inactivity. &rarr;
I tested on my macOS M1 machine and it appears to be working. I think this can be closed.
Tested on x86_64 darwin and it worked
I find that the GUI starts on macOS (x86_64-darwin), but fails to load the required libraries, and crashes soon afterward. Upon opening the application, it presents a modal dialog with the following message: In the main window, it presents this message:
BTW, if you start Wireshark from terminal like this: it will show error about plugins, but it wil start capturing packets but in terminal there are errors like: I don't know if it can help somehow.

Discussion:
, buildPackages , c-ares , cmake <ins> , fixDarwinDylibNames </ins> , flex , gettext , glib

, withQt ? true , qt6 ? null }: <ins> let isAppBundle = withQt && stdenv.isDarwin; in </ins> assert withQt -> qt6 != null; stdenv.mkDerivation rec {

] ++ lib.optionals withQt [ qt6.wrapQtAppsHook wrapGAppsHook3 <ins> ] ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames </ins> ]; buildInputs = [

"-DBUILD_wireshark=${if withQt then "ON" else "OFF"}" # Fix `extcap` and `plugins` paths. See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=16444 "-DCMAKE_INSTALL_LIBDIR=lib" <del> "-DENABLE_APPLICATION_BUNDLE=${if withQt && stdenv.isDarwin then "ON" else "OFF"}" </del> <ins> "-DENABLE_APPLICATION_BUNDLE=${if isAppBundle then "ON" else "OFF"}" </ins> "-DLEMON_C_COMPILER=cc" ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "-DHAVE_C99_VSNPRINTF_EXITCODE__TRYRUN_OUTPUT="

postInstall = '' cmake --install . --prefix "''${!outputDev}" --component Development <del> '' + lib.optionalString (stdenv.isDarwin && withQt) '' </del> <ins> '' + lib.optionalString isAppBundle '' </ins> mkdir -p $out/Applications mv $out/bin/Wireshark.app $out/Applications/Wireshark.app <ins> '' + lib.optionalString stdenv.isDarwin '' local flags=() for file in $out/lib/*.dylib; do flags+=(-change @rpath/"$(basename "$file")" "$file") done </ins> <del> for f in $(find $out/Applications/Wireshark.app/Contents/PlugIns -name "*.so"); do for dylib in $(otool -L $f | awk '/^t*lib/ {print $1}'); do install_name_tool -change "$dylib" "$out/lib/$dylib" "$f" done </del> <ins> for file in $out/lib/wireshark/extcap/*; do if [ -L "$file" ]; then continue; fi echo "$file: fixing dylib references" # note that -id does nothing on binaries install_name_tool -id "$file" "''${flags[@]}" "$file" </ins> done '';

qtWrapperArgs+=("''${gappsWrapperArgs[@]}") ''; <ins> # This is done to remove some binary wrappers that wrapQtApps adds in *.app directories. # Copying because unfortunately pointing Wireshark (when built as an appbundle) at $out/lib instead is nontrivial. postFixup = lib.optionalString isAppBundle '' rm -rf $out/Applications/Wireshark.app/Contents/MacOS/extcap $out/Applications/Wireshark.app/Contents/PlugIns mkdir -p $out/Applications/Wireshark.app/Contents/PlugIns/wireshark cp -r $out/lib/wireshark/plugins/4-2 $out/Applications/Wireshark.app/Contents/PlugIns/wireshark/4-2 cp -r $out/lib/wireshark/extcap $out/Applications/Wireshark.app/Contents/MacOS/extcap ''; </ins> meta = with lib; { description = "Powerful network protocol analyzer"; longDescription = ''