nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 67 lines 1.5 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 automake, 6 autoconf, 7 openssl, 8 zlib, 9 libpcap, 10 boost, 11 useCairo ? false, 12 cairo, 13}: 14 15stdenv.mkDerivation rec { 16 pname = "tcpflow"; 17 version = "1.6.1"; 18 19 src = fetchFromGitHub { 20 owner = "simsong"; 21 repo = "tcpflow"; 22 rev = "tcpflow-${version}"; 23 sha256 = "0vbm097jhi5n8pg08ia1yhzc225zv9948blb76f4br739l9l22vq"; 24 fetchSubmodules = true; 25 }; 26 27 nativeBuildInputs = [ 28 automake 29 autoconf 30 ]; 31 buildInputs = [ 32 openssl 33 zlib 34 libpcap 35 boost 36 ] 37 ++ lib.optional useCairo cairo; 38 39 prePatch = '' 40 substituteInPlace bootstrap.sh \ 41 --replace ".git" "" \ 42 --replace "/bin/rm" "rm" 43 # Temporary fix for a build error: 44 # https://src.fedoraproject.org/rpms/tcpflow/blob/979e250032b90de2d6b9e5b94b5203d98cccedad/f/tcpflow-1.6.1-format.patch 45 substituteInPlace src/datalink.cpp \ 46 --replace 'DEBUG(6)(s.c_str());' 'DEBUG(6) ("%s", s.c_str());' 47 ''; 48 49 preConfigure = "bash ./bootstrap.sh"; 50 51 meta = with lib; { 52 description = "TCP stream extractor"; 53 longDescription = '' 54 tcpflow is a program that captures data transmitted as part of TCP 55 connections (flows), and stores the data in a way that is convenient for 56 protocol analysis and debugging. 57 ''; 58 inherit (src.meta) homepage; 59 license = licenses.gpl3; 60 maintainers = with maintainers; [ 61 raskin 62 obadz 63 ]; 64 platforms = platforms.unix; 65 mainProgram = "tcpflow"; 66 }; 67}