From ab613b933671e2d4bbdfeda81ad8356ea3a88152 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Wed, 9 May 2018 14:31:26 +0900 Subject: [PATCH] wireshark: run binary from nix-shell when in a shell, export variable WIRESHARK_RUN_FROM_BUILD_DIRECTORY to be able to run the newly built wireshark else one get: ./build/run/wireshark: error while loading shared libraries: libwscodecs.so.0: cannot open shared object file: No such file or directory see https://github.com/NixOS/nixpkgs/issues/29638 --- pkgs/applications/networking/sniffers/wireshark/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index d8ff5f3100ac..8c745a4aa3f8 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -82,6 +82,11 @@ in stdenv.mkDerivation { enableParallelBuilding = true; + shellHook = '' + # to be able to run the resulting binary + export WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1 + ''; + meta = with stdenv.lib; { homepage = https://www.wireshark.org/; description = "Powerful network protocol analyzer";