1{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, libpcap }:
2
3stdenv.mkDerivation rec {
4 pname = "libcrafter";
5 version = "1.0";
6
7 src = fetchFromGitHub {
8 owner = "pellegre";
9 repo = "libcrafter";
10 rev = "version-${version}";
11 sha256 = "sha256-tCdN3+EzISVl+wp5umOFD+bgV+uUdabH+2LyxlV/W7Q=";
12 };
13
14 preConfigure = "cd libcrafter";
15
16 configureScript = "./autogen.sh";
17
18 configureFlags = [ "--with-libpcap=yes" ];
19
20 nativeBuildInputs = [ autoconf automake ];
21 buildInputs = [ libtool ];
22
23 propagatedBuildInputs = [ libpcap ];
24
25 meta = {
26 homepage = "https://github.com/pellegre/libcrafter";
27 description = "High level C++ network packet sniffing and crafting library";
28 license = lib.licenses.bsd3;
29 maintainers = [ ];
30 platforms = lib.platforms.unix;
31 };
32}