2019-08-26 18:34:12 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, automake, autoconf
|
|
|
|
, openssl, zlib, libpcap, boost
|
|
|
|
, useCairo ? false, cairo
|
|
|
|
}:
|
2016-05-03 01:39:46 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-26 18:34:12 +01:00
|
|
|
pname = "tcpflow";
|
2021-02-24 17:34:24 +00:00
|
|
|
version = "1.6.1";
|
2016-05-03 01:39:46 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simsong";
|
2019-08-26 18:34:12 +01:00
|
|
|
repo = pname;
|
|
|
|
rev = "${pname}-${version}";
|
2021-02-24 17:34:24 +00:00
|
|
|
sha256 = "0vbm097jhi5n8pg08ia1yhzc225zv9948blb76f4br739l9l22vq";
|
2019-08-26 18:34:12 +01:00
|
|
|
fetchSubmodules = true;
|
2014-04-11 08:08:22 +01:00
|
|
|
};
|
2016-05-03 01:39:46 +01:00
|
|
|
|
2019-08-26 18:34:12 +01:00
|
|
|
nativeBuildInputs = [ automake autoconf ];
|
|
|
|
buildInputs = [ openssl zlib libpcap boost ]
|
|
|
|
++ lib.optional useCairo cairo;
|
2016-05-03 01:39:46 +01:00
|
|
|
|
|
|
|
prePatch = ''
|
2019-08-26 18:34:12 +01:00
|
|
|
substituteInPlace bootstrap.sh \
|
|
|
|
--replace ".git" "" \
|
|
|
|
--replace "/bin/rm" "rm"
|
2021-02-24 17:34:24 +00:00
|
|
|
# Temporary fix for a build error:
|
|
|
|
# https://src.fedoraproject.org/rpms/tcpflow/blob/979e250032b90de2d6b9e5b94b5203d98cccedad/f/tcpflow-1.6.1-format.patch
|
|
|
|
substituteInPlace src/datalink.cpp \
|
|
|
|
--replace 'DEBUG(6)(s.c_str());' 'DEBUG(6) ("%s", s.c_str());'
|
2016-05-03 01:39:46 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = "bash ./bootstrap.sh";
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-08-26 18:34:12 +01:00
|
|
|
description = "TCP stream extractor";
|
|
|
|
longDescription = ''
|
|
|
|
tcpflow is a program that captures data transmitted as part of TCP
|
|
|
|
connections (flows), and stores the data in a way that is convenient for
|
|
|
|
protocol analysis and debugging.
|
|
|
|
'';
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = licenses.gpl3;
|
2021-02-24 17:34:24 +00:00
|
|
|
maintainers = with maintainers; [ raskin obadz ];
|
2016-05-03 01:39:46 +01:00
|
|
|
platforms = platforms.linux;
|
2014-04-11 08:08:22 +01:00
|
|
|
};
|
|
|
|
}
|