pkgsStatic.iptables: fix build

As a result of 8f45423217 ("libpcap: build with libnl"), the static
build started to fail, because iptables didn't know to link with
libnl.  The patch makes iptables use pkg-config to find libpcap, which
means it knows about other libraries that need to be linked when doing
a static build.
This commit is contained in:
Alyssa Ross 2023-04-01 10:17:58 +00:00
parent d2813d505e
commit 2ef1e26ea5

View file

@ -1,4 +1,5 @@
{ lib, stdenv, fetchurl, pkg-config, pruneLibtoolFiles, flex, bison
{ lib, stdenv, fetchurl
, autoreconfHook, pkg-config, pruneLibtoolFiles, flex, bison
, libmnl, libnetfilter_conntrack, libnfnetlink, libnftnl, libpcap
, nftablesCompat ? true
, fetchpatch
@ -19,11 +20,18 @@ stdenv.mkDerivation rec {
url = "https://git.netfilter.org/iptables/patch/?id=ed4082a7405a5838c205a34c1559e289949200cc";
sha256 = "OdytFmHk+3Awu+sDQpGTl5/qip4doRblmW2vQzfNZiU=";
})
(fetchurl {
name = "static.patch";
url = "https://lore.kernel.org/netfilter-devel/20230402232939.1060151-1-hi@alyssa.is/raw";
sha256 = "PkH+1HbJjBb3//ffBe0XUQok1lBwgj/STL8Ppu/28f4=";
})
];
outputs = [ "out" "dev" "man" ];
nativeBuildInputs = [ pkg-config pruneLibtoolFiles flex bison ];
nativeBuildInputs = [
autoreconfHook pkg-config pruneLibtoolFiles flex bison
];
buildInputs = [ libmnl libnetfilter_conntrack libnfnetlink libnftnl libpcap ];