From da89a2d075f2279a09585c1b217b8f7382817339 Mon Sep 17 00:00:00 2001 From: nikstur Date: Sun, 27 Jul 2025 21:18:57 +0200 Subject: [PATCH] libpcap: add separate lib output This enables us to use the lib output without pulling in bash. - Enable structuredAttrs - Enable strictDeps - Add bash to disallowedRequisites --- pkgs/by-name/li/libpcap/package.nix | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/li/libpcap/package.nix b/pkgs/by-name/li/libpcap/package.nix index 1e77e3388084..4936b39c8833 100644 --- a/pkgs/by-name/li/libpcap/package.nix +++ b/pkgs/by-name/li/libpcap/package.nix @@ -4,6 +4,8 @@ fetchurl, flex, bison, + bash, + bashNonInteractive, bluez, libnl, libxcrypt, @@ -26,13 +28,25 @@ stdenv.mkDerivation rec { pname = "libpcap"; version = "1.10.5"; + __structuredAttrs = true; + src = fetchurl { url = "https://www.tcpdump.org/release/${pname}-${version}.tar.gz"; hash = "sha256-N87ZChmjAqfzLkWCJKAMNlwReQXCzTWsVEtogKgUiPA="; }; - buildInputs = - lib.optionals stdenv.hostPlatform.isLinux [ libnl ] ++ lib.optionals withRemote [ libxcrypt ]; + outputs = [ + "out" + "lib" + ]; + + strictDeps = true; + + buildInputs = [ + bash + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ libnl ] + ++ lib.optionals withRemote [ libxcrypt ]; nativeBuildInputs = [ flex @@ -62,6 +76,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + outputChecks.lib.disallowedRequisites = [ + bash + bashNonInteractive + ]; + passthru.tests = { inherit ettercap