3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/compactor/default.nix

72 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
, asciidoctor, autoreconfHook, pkg-config
, boost, libctemplate, libmaxminddb, libpcap, libtins, openssl, protobuf, xz, zlib
, cbor-diag, cddl, diffutils, file, mktemp, netcat, tcpdump, wireshark-cli
2019-05-26 16:11:51 +01:00
}:
2018-03-22 23:48:53 +00:00
stdenv.mkDerivation rec {
2019-05-26 16:11:51 +01:00
pname = "compactor";
version = "1.2.0";
2018-03-22 23:48:53 +00:00
src = fetchFromGitHub {
owner = "dns-stats";
2019-05-26 16:11:51 +01:00
repo = pname;
rev = version;
fetchSubmodules = true;
hash = "sha256-AUNPUk70VwJ0nZgMPLMU258nqkL4QP6km0USrZi2ea0=";
2018-03-22 23:48:53 +00:00
};
nativeBuildInputs = [
asciidoctor
autoreconfHook
pkg-config
];
2018-03-22 23:48:53 +00:00
buildInputs = [
boost
libctemplate
libmaxminddb
2018-03-22 23:48:53 +00:00
libpcap
libtins
openssl
protobuf
2021-03-14 18:12:53 +00:00
xz
zlib
2018-03-22 23:48:53 +00:00
];
postPatch = ''
2018-03-22 23:48:53 +00:00
patchShebangs test-scripts/
'';
preConfigure = ''
substituteInPlace configure \
--replace "/usr/bin/file" "${file}/bin/file"
'';
2018-03-22 23:48:53 +00:00
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
"--with-boost=${boost.dev}"
];
2019-05-26 16:11:51 +01:00
enableParallelBuilding = true;
2018-03-22 23:48:53 +00:00
doCheck = !stdenv.isDarwin; # check-dnstap.sh failing on Darwin
checkInputs = [
cbor-diag
cddl
diffutils
file
mktemp
netcat
tcpdump
wireshark-cli
];
2018-03-22 23:48:53 +00:00
meta = with lib; {
2018-03-22 23:48:53 +00:00
description = "Tools to capture DNS traffic and record it in C-DNS files";
homepage = "https://dns-stats.org/";
2019-05-26 16:11:51 +01:00
changelog = "https://github.com/dns-stats/${pname}/raw/${version}/ChangeLog.txt";
license = licenses.mpl20;
2018-03-22 23:48:53 +00:00
maintainers = with maintainers; [ fdns ];
platforms = platforms.unix;
2018-03-22 23:48:53 +00:00
};
}