diff --git a/pkgs/development/libraries/libpcap/default.nix b/pkgs/development/libraries/libpcap/default.nix index 443e4de04d9e..312e1dbf87cd 100644 --- a/pkgs/development/libraries/libpcap/default.nix +++ b/pkgs/development/libraries/libpcap/default.nix @@ -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;