diff --git a/pkgs/development/libraries/libpcap/default.nix b/pkgs/development/libraries/libpcap/default.nix index c04d4a001a1..a44fde01860 100644 --- a/pkgs/development/libraries/libpcap/default.nix +++ b/pkgs/development/libraries/libpcap/default.nix @@ -17,10 +17,7 @@ stdenv.mkDerivation rec { # We need to force the autodetection because detection doesn't # work in pure build environments. configureFlags = [ - ("--with-pcap=" + { - linux = "linux"; - darwin = "bpf"; - }.${stdenv.hostPlatform.parsed.kernel.name}) + "--with-pcap=${if stdenv.isLinux then "linux" else "bpf"}" ] ++ optionals stdenv.isDarwin [ "--disable-universal" ] ++ optionals (stdenv.hostPlatform == stdenv.buildPlatform)