nixpkgs/pkgs/applications/networking/compactor/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

77 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
, asciidoctor, autoreconfHook, pkg-config
, boost, libctemplate, libmaxminddb, libpcap, libtins, openssl, protobuf, xz, zlib, catch2
, cbor-diag, cddl, diffutils, file, mktemp, netcat, tcpdump, wireshark-cli
2019-05-26 15:11:51 +00:00
}:
2018-03-22 23:48:53 +00:00
stdenv.mkDerivation rec {
2019-05-26 15:11:51 +00:00
pname = "compactor";
2023-08-10 03:10:40 +00:00
version = "1.2.3";
2018-03-22 23:48:53 +00:00
src = fetchFromGitHub {
owner = "dns-stats";
2024-03-15 17:30:43 +00:00
repo = "compactor";
2019-05-26 15:11:51 +00:00
rev = version;
fetchSubmodules = true;
2023-08-10 03:10:40 +00:00
hash = "sha256-5Z14suhO5ghhmZsSj4DsSoKm+ct2gQFO6qxhjmx4Xm4=";
2018-03-22 23:48:53 +00:00
};
patches = [
./patches/add-a-space-after-type-in-check-response-opt-sh.patch
];
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/
cp ${catch2}/include/catch2/catch.hpp tests/catch.hpp
2018-03-22 23:48:53 +00:00
'';
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 15:11:51 +00:00
enableParallelBuilding = true;
2018-03-22 23:48:53 +00:00
doCheck = !stdenv.isDarwin; # check-dnstap.sh failing on Darwin
nativeCheckInputs = [
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/";
2024-03-15 17:30:43 +00:00
changelog = "https://github.com/dns-stats/compactor/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
};
}