Merge pull request #212260 from SuperSandro2000/libpcap

libpcap: remove with lib over entire file
This commit is contained in:
Jonas Heinrich 2023-01-25 11:02:01 +01:00 committed by GitHub
commit 5512c7c552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,8 +10,6 @@
, withRemote ? false
}:
with lib;
stdenv.mkDerivation rec {
pname = "libpcap";
version = "1.10.1";
@ -21,20 +19,20 @@ stdenv.mkDerivation rec {
sha256 = "sha256-7ShfSsyvBTRPkJdXV7Pb/ncrpB0cQBwmSLf6RbcRvdQ=";
};
buildInputs = optionals withRemote [ libxcrypt ];
buildInputs = lib.optionals withRemote [ libxcrypt ];
nativeBuildInputs = [ flex bison ]
++ optionals withBluez [ bluez.dev pkg-config ];
++ lib.optionals withBluez [ bluez.dev pkg-config ];
# We need to force the autodetection because detection doesn't
# work in pure build environments.
configureFlags = [
"--with-pcap=${if stdenv.isLinux then "linux" else "bpf"}"
] ++ optionals stdenv.isDarwin [
] ++ lib.optionals stdenv.isDarwin [
"--disable-universal"
] ++ optionals withRemote [
] ++ lib.optionals withRemote [
"--enable-remote"
] ++ optionals (stdenv.hostPlatform == stdenv.buildPlatform)
] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform)
[ "ac_cv_linux_vers=2" ];
postInstall = ''
@ -43,7 +41,7 @@ stdenv.mkDerivation rec {
fi
'';
meta = {
meta = with lib; {
homepage = "https://www.tcpdump.org";
description = "Packet Capture Library";
platforms = platforms.unix;