From 5211a3ecb262a319233da0ff21bfb3d78f3bcae8 Mon Sep 17 00:00:00 2001 From: nikstur Date: Sun, 27 Jul 2025 21:18:57 +0200 Subject: [PATCH] iptables: 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/os-specific/linux/iptables/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/os-specific/linux/iptables/default.nix b/pkgs/os-specific/linux/iptables/default.nix index aebb616eb39d..d9f2ee61c266 100644 --- a/pkgs/os-specific/linux/iptables/default.nix +++ b/pkgs/os-specific/linux/iptables/default.nix @@ -12,6 +12,8 @@ libnfnetlink, libnftnl, libpcap, + bash, + bashNonInteractive, nftablesCompat ? true, gitUpdater, }: @@ -20,6 +22,8 @@ stdenv.mkDerivation rec { version = "1.8.11"; pname = "iptables"; + __structuredAttrs = true; + src = fetchurl { url = "https://www.netfilter.org/projects/${pname}/files/${pname}-${version}.tar.xz"; sha256 = "2HMD1V74ySvK1N0/l4sm0nIBNkKwKUJXdfW60QCf57I="; @@ -27,10 +31,13 @@ stdenv.mkDerivation rec { outputs = [ "out" + "lib" "dev" "man" ]; + strictDeps = true; + nativeBuildInputs = [ autoreconfHook pkg-config @@ -45,6 +52,7 @@ stdenv.mkDerivation rec { libnfnetlink libnftnl libpcap + bash ]; configureFlags = [ @@ -68,6 +76,11 @@ stdenv.mkDerivation rec { ln -sv xtables-nft-multi $out/bin/ip6tables-save ''; + outputChecks.lib.disallowedRequisites = [ + bash + bashNonInteractive + ]; + passthru = { updateScript = gitUpdater { url = "https://git.netfilter.org/iptables";