1{ lib
2, stdenv
3, fetchFromGitHub
4, which
5, autoconf
6, automake
7, libtool
8, libpcap
9, json_c
10, pkg-config }:
11
12stdenv.mkDerivation rec {
13 pname = "ndpi";
14 version = "4.2";
15
16 src = fetchFromGitHub {
17 owner = "ntop";
18 repo = "nDPI";
19 rev = version;
20 sha256 = "sha256-ZWWuyPGl+hbrfXdtPvCBqMReuJ4FiGx+qiI7qCz6wtQ=";
21 };
22
23 configureScript = "./autogen.sh";
24
25 nativeBuildInputs = [ which autoconf automake libtool pkg-config ];
26 buildInputs = [
27 libpcap
28 json_c
29 ];
30
31 meta = with lib; {
32 description = "A library for deep-packet inspection";
33 longDescription = ''
34 nDPI is a library for deep-packet inspection based on OpenDPI.
35 '';
36 homepage = "https://www.ntop.org/products/deep-packet-inspection/ndpi/";
37 license = with licenses; [ lgpl3Plus bsd3 ];
38 maintainers = with maintainers; [ takikawa ];
39 mainProgram = "ndpiReader";
40 platforms = with platforms; unix;
41 };
42}