summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2018-03-28 22:17:37 +0000
committerGitHub <noreply@github.com>2018-03-28 22:17:37 +0000
commitdf5f67de941860478781ccd35e8951c81f4b2ca5 (patch)
tree5fdcf1ec7978d48ed9b2590258d227304caa1e9c /pkgs/applications
parent9acdfbfd7280f7ae45411e2f3c005269dc053e78 (diff)
parentf784c6be188dc0c74e892df6dee7baefb7436da2 (diff)
downloadnixlib-df5f67de941860478781ccd35e8951c81f4b2ca5.tar
nixlib-df5f67de941860478781ccd35e8951c81f4b2ca5.tar.gz
nixlib-df5f67de941860478781ccd35e8951c81f4b2ca5.tar.bz2
nixlib-df5f67de941860478781ccd35e8951c81f4b2ca5.tar.lz
nixlib-df5f67de941860478781ccd35e8951c81f4b2ca5.tar.xz
nixlib-df5f67de941860478781ccd35e8951c81f4b2ca5.tar.zst
nixlib-df5f67de941860478781ccd35e8951c81f4b2ca5.zip
Merge pull request #37680 from fdns/compact
compactor: init at 0.11.0
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/networking/compactor/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/applications/networking/compactor/default.nix b/pkgs/applications/networking/compactor/default.nix
new file mode 100644
index 000000000000..749b94f7b7ec
--- /dev/null
+++ b/pkgs/applications/networking/compactor/default.nix
@@ -0,0 +1,52 @@
+{ autoconf, automake, boost, cbor-diag, cddl, fetchFromGitHub, file, gcc, libpcap, libtins, libtool, lzma, openssl, pkgconfig, stdenv, tcpdump, wireshark-cli }:
+
+stdenv.mkDerivation rec {
+  name = "compactor-${version}";
+  version = "0.11.0";
+
+  src = fetchFromGitHub {
+    owner = "dns-stats";
+    repo = "compactor";
+    rev = "${version}";
+    sha256 = "1zn6w99xqq5igaz0n89429i78a5pj4nnfn1mm5yv1yfbn1lm0y3l";
+  };
+
+  # cbor-diag, cddl and wireshark-cli are only used for tests.
+  nativeBuildInputs = [ autoconf automake libtool pkgconfig cbor-diag cddl wireshark-cli ];
+  buildInputs = [
+    boost
+    libpcap
+    openssl
+    libtins
+    lzma
+  ];
+
+  patchPhase = ''
+    patchShebangs test-scripts/
+  '';
+
+  preConfigure = ''
+    sh autogen.sh
+    substituteInPlace configure \
+      --replace "/usr/bin/file" "${file}/bin/file"
+  '';
+  CXXFLAGS = "-std=c++11";
+  configureFlags = [
+    "--with-boost-libdir=${boost.out}/lib"
+    "--with-boost=${boost.dev}"
+  ];
+
+  doCheck = true;
+  preCheck = ''
+    substituteInPlace test-scripts/check-live-pcap.sh \
+      --replace "/usr/sbin/tcpdump" "${tcpdump}/bin/tcpdump"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Tools to capture DNS traffic and record it in C-DNS files";
+    homepage    = http://dns-stats.org/;
+    license     = [ licenses.boost licenses.mpl20 licenses.openssl ];
+    maintainers = with maintainers; [ fdns ];
+    platforms   = stdenv.lib.platforms.unix;
+  };
+}