4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ stdenv, lib, fetchFromGitHub, automake, autoconf
|
|
, openssl, zlib, libpcap, boost
|
|
, useCairo ? false, cairo
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "tcpflow";
|
|
version = "1.5.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "simsong";
|
|
repo = pname;
|
|
rev = "${pname}-${version}";
|
|
sha256 = "063n3pfqa0lgzcwk4c0h01g2y5c3sli615j6a17dxpg95aw1zryy";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
nativeBuildInputs = [ automake autoconf ];
|
|
buildInputs = [ openssl zlib libpcap boost ]
|
|
++ lib.optional useCairo cairo;
|
|
|
|
prePatch = ''
|
|
substituteInPlace bootstrap.sh \
|
|
--replace ".git" "" \
|
|
--replace "/bin/rm" "rm"
|
|
substituteInPlace configure.ac \
|
|
--replace "1.5.1" "1.5.2"
|
|
'';
|
|
|
|
preConfigure = "bash ./bootstrap.sh";
|
|
|
|
meta = with lib; {
|
|
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;
|
|
maintainers = with maintainers; [ primeos raskin obadz ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|