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
This commit is contained in:
nikstur
2025-08-10 20:29:38 +02:00
parent 7a955016e6
commit da89a2d075
+21 -2
View File
@@ -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