Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub 2, asciidoctor, autoreconfHook, pkg-config 3, boost, libctemplate, libmaxminddb, libpcap, libtins, openssl, protobuf, xz, zlib, catch2 4, cbor-diag, cddl, diffutils, file, mktemp, netcat, tcpdump, wireshark-cli 5}: 6 7stdenv.mkDerivation rec { 8 pname = "compactor"; 9 version = "1.2.2"; 10 11 src = fetchFromGitHub { 12 owner = "dns-stats"; 13 repo = pname; 14 rev = version; 15 fetchSubmodules = true; 16 hash = "sha256-SgmtlbYOrSMzVfzsrbg4qs+yGkXQialiJTI99EBsUjQ="; 17 }; 18 19 nativeBuildInputs = [ 20 asciidoctor 21 autoreconfHook 22 pkg-config 23 ]; 24 buildInputs = [ 25 boost 26 libctemplate 27 libmaxminddb 28 libpcap 29 libtins 30 openssl 31 protobuf 32 xz 33 zlib 34 ]; 35 36 postPatch = '' 37 patchShebangs test-scripts/ 38 cp ${catch2}/include/catch2/catch.hpp tests/catch.hpp 39 ''; 40 41 preConfigure = '' 42 substituteInPlace configure \ 43 --replace "/usr/bin/file" "${file}/bin/file" 44 ''; 45 46 configureFlags = [ 47 "--with-boost-libdir=${boost.out}/lib" 48 "--with-boost=${boost.dev}" 49 ]; 50 enableParallelBuilding = true; 51 52 doCheck = !stdenv.isDarwin; # check-dnstap.sh failing on Darwin 53 nativeCheckInputs = [ 54 cbor-diag 55 cddl 56 diffutils 57 file 58 mktemp 59 netcat 60 tcpdump 61 wireshark-cli 62 ]; 63 64 meta = with lib; { 65 description = "Tools to capture DNS traffic and record it in C-DNS files"; 66 homepage = "https://dns-stats.org/"; 67 changelog = "https://github.com/dns-stats/${pname}/raw/${version}/ChangeLog.txt"; 68 license = licenses.mpl20; 69 maintainers = with maintainers; [ fdns ]; 70 platforms = platforms.unix; 71 }; 72}