summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ulogd
diff options
context:
space:
mode:
authorPhilippe Hürlimann <p@hurlimann.org>2022-12-26 18:50:22 +0100
committerPhilippe Hürlimann <p@hurlimann.org>2022-12-28 00:17:27 +0100
commit77763b4c88fcb64be548d419fc8a4f0ac04548ea (patch)
treefd8b99f6854c07e17ad498fd1c36205297680795 /pkgs/os-specific/linux/ulogd
parentc3161d81bd54122c26021a26e3e571de86d593ce (diff)
downloadnixpkgs-77763b4c88fcb64be548d419fc8a4f0ac04548ea.tar
nixpkgs-77763b4c88fcb64be548d419fc8a4f0ac04548ea.tar.gz
nixpkgs-77763b4c88fcb64be548d419fc8a4f0ac04548ea.tar.bz2
nixpkgs-77763b4c88fcb64be548d419fc8a4f0ac04548ea.tar.lz
nixpkgs-77763b4c88fcb64be548d419fc8a4f0ac04548ea.tar.xz
nixpkgs-77763b4c88fcb64be548d419fc8a4f0ac04548ea.tar.zst
nixpkgs-77763b4c88fcb64be548d419fc8a4f0ac04548ea.zip
ulogd: init at 2.0.8
Heavily based on original work by xvuko.

Co-authored-by: xvuko <nix@vuko.pl>
Diffstat (limited to 'pkgs/os-specific/linux/ulogd')
-rw-r--r--pkgs/os-specific/linux/ulogd/default.nix72
1 files changed, 72 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/ulogd/default.nix b/pkgs/os-specific/linux/ulogd/default.nix
new file mode 100644
index 00000000000..fb5fd465f1f
--- /dev/null
+++ b/pkgs/os-specific/linux/ulogd/default.nix
@@ -0,0 +1,72 @@
+{ stdenv, lib, fetchurl, gnumake, libnetfilter_acct, libnetfilter_conntrack
+, libnetfilter_log, libmnl, libnfnetlink, automake, autoconf, autogen, libtool
+, pkg-config, libpcap, linuxdoc-tools, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  version = "2.0.8";
+  pname = "ulogd";
+
+  src = fetchurl {
+    url = "https://netfilter.org/projects/${pname}/files/${pname}-${version}.tar.bz2";
+    hash = "sha256-Tq1sOXDD9X+h6J/i18xIO6b+K9GwhwFSHgs6/WZ98pE=";
+  };
+
+  outputs = [ "out" "doc" "man" ];
+
+  postPatch = ''
+    substituteInPlace ulogd.8 --replace "/usr/share/doc" "$doc/share/doc"
+  '';
+
+  postBuild = ''
+    pushd doc/
+    linuxdoc --backend=txt --filter ulogd.sgml
+    linuxdoc --backend=html --split=0 ulogd.sgml
+    popd
+  '';
+
+  postInstall = ''
+    install -Dm444 -t $out/share/doc/${pname} ulogd.conf doc/ulogd.txt doc/ulogd.html README doc/*table
+    install -Dm444 -t $out/share/doc/${pname}-mysql doc/mysql*.sql
+    install -Dm444 -t $out/share/doc/${pname}-pgsql doc/pgsql*.sql
+  '';
+
+  buildInputs = [
+    libnetfilter_acct
+    libnetfilter_conntrack
+    libnetfilter_log
+    libmnl
+    libnfnetlink
+    libpcap
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    automake
+    autoconf
+    autogen
+    libtool
+    linuxdoc-tools
+  ];
+
+  meta = with lib; {
+    description = "Userspace logging daemon for netfilter/iptables";
+
+    longDescription = ''
+      Logging daemon that reads event messages coming from the Netfilter
+      connection tracking, the Netfilter packet logging subsystem and from the
+      Netfilter accounting subsystem. You have to enable support for connection
+      tracking event delivery; ctnetlink and the NFLOG target in your Linux
+      kernel 2.6.x or load their respective modules. The deprecated ULOG target
+      (which has been superseded by NFLOG) is also supported.
+
+      The received messages can be logged into files or into a MySQL, SQLite3
+      or PostgreSQL database. IPFIX and Graphite output are also supported.
+    '';
+
+    homepage = "https://www.netfilter.org/projects/ulogd/index.html";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ p-h ];
+  };
+}