diff --git a/pkgs/development/libraries/libpcap/default.nix b/pkgs/development/libraries/libpcap/default.nix index d9cb91e4fb3b..fcb599e00f57 100644 --- a/pkgs/development/libraries/libpcap/default.nix +++ b/pkgs/development/libraries/libpcap/default.nix @@ -29,7 +29,9 @@ stdenv.mkDerivation rec { ''; postInstall = '' - rm -f $out/lib/libpcap.a + if [ "$dontDisableStatic" -ne "1" ]; then + rm -f $out/lib/libpcap.a + fi ''; meta = { diff --git a/pkgs/tools/networking/dsniff/default.nix b/pkgs/tools/networking/dsniff/default.nix index 4fe381cdd7a7..50de41b921c0 100644 --- a/pkgs/tools/networking/dsniff/default.nix +++ b/pkgs/tools/networking/dsniff/default.nix @@ -14,7 +14,7 @@ let }; pcap = symlinkJoin { inherit (libpcap) name; - paths = [ libpcap ]; + paths = [ (libpcap.overrideAttrs(old: { dontDisableStatic = true; })) ]; postBuild = '' cp -rs $out/include/pcap $out/include/net # prevent references to libpcap