
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19
.tar.gz \
--argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
result/bin/apply-formatting $NIXPKGS_PATH
69 lines
1.9 KiB
Nix
69 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
autoreconfHook,
|
|
libpcap,
|
|
pcre,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ngrep";
|
|
version = "1.47";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jpr5";
|
|
repo = "ngrep";
|
|
rev = "V${lib.replaceStrings [ "." ] [ "_" ] version}";
|
|
sha256 = "1x2fyd7wdqlj1r76ilal06cl2wmbz0ws6i3ys204sbjh1cj6dcl7";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
url = "https://patch-diff.githubusercontent.com/raw/jpr5/ngrep/pull/11.patch";
|
|
sha256 = "0k5qzvj8j3r1409qwwvzp7m3clgs2g7hs4q68bhrqbrsvvb2h5dh";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
buildInputs = [
|
|
libpcap
|
|
pcre
|
|
];
|
|
|
|
configureFlags = [
|
|
"--enable-ipv6"
|
|
"--enable-pcre"
|
|
"--disable-pcap-restart"
|
|
"--with-pcap-includes=${libpcap}/include"
|
|
];
|
|
|
|
preConfigure = ''
|
|
sed -i "s|BPF=.*|BPF=${libpcap}/include/pcap/bpf.h|" configure
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Network packet analyzer";
|
|
longDescription = ''
|
|
ngrep strives to provide most of GNU grep's common features, applying
|
|
them to the network layer. ngrep is a pcap-aware tool that will allow you
|
|
to specify extended regular or hexadecimal expressions to match against
|
|
data payloads of packets. It currently recognizes IPv4/6, TCP, UDP,
|
|
ICMPv4/6, IGMP and Raw across Ethernet, PPP, SLIP, FDDI, Token Ring and
|
|
null interfaces, and understands BPF filter logic in the same fashion as
|
|
more common packet sniffing tools, such as tcpdump and snoop.
|
|
'';
|
|
homepage = "https://github.com/jpr5/ngrep/";
|
|
license = {
|
|
shortName = "ngrep"; # BSD-style, see README.md and LICENSE
|
|
url = "https://github.com/jpr5/ngrep/blob/master/LICENSE";
|
|
free = true;
|
|
redistributable = true;
|
|
};
|
|
platforms = with platforms; linux ++ darwin;
|
|
maintainers = [ maintainers.bjornfor ];
|
|
mainProgram = "ngrep";
|
|
};
|
|
}
|