libpcap: fix build on NetBSD

This commit is contained in:
Alyssa Ross 2021-04-18 11:16:54 +00:00
parent d0a243c4ba
commit 43445e9422

View File

@ -17,10 +17,7 @@ stdenv.mkDerivation rec {
# We need to force the autodetection because detection doesn't # We need to force the autodetection because detection doesn't
# work in pure build environments. # work in pure build environments.
configureFlags = [ configureFlags = [
("--with-pcap=" + { "--with-pcap=${if stdenv.isLinux then "linux" else "bpf"}"
linux = "linux";
darwin = "bpf";
}.${stdenv.hostPlatform.parsed.kernel.name})
] ++ optionals stdenv.isDarwin [ ] ++ optionals stdenv.isDarwin [
"--disable-universal" "--disable-universal"
] ++ optionals (stdenv.hostPlatform == stdenv.buildPlatform) ] ++ optionals (stdenv.hostPlatform == stdenv.buildPlatform)