From fa3378e9c42cde077e2e9572df86d6a8de42e943 Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Sat, 13 Feb 2021 14:17:33 +0000 Subject: [PATCH] pmacct: 1.7.5 -> 1.7.6 --- pkgs/tools/networking/pmacct/default.nix | 67 ++++++++++++------------ 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/pkgs/tools/networking/pmacct/default.nix b/pkgs/tools/networking/pmacct/default.nix index 9cb8c0b88f7..86f1af029df 100644 --- a/pkgs/tools/networking/pmacct/default.nix +++ b/pkgs/tools/networking/pmacct/default.nix @@ -1,55 +1,56 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , pkg-config , autoreconfHook , libtool , libpcap - +, libcdada # Optional Dependencies -, zlib ? null -, withJansson ? true, jansson ? null -, withNflog ? true, libnetfilter_log ? null -, withSQLite ? true, sqlite ? null -, withPgSQL ? true, postgresql ? null -, withMysql ? true, libmysqlclient ? null }: - -assert withJansson -> jansson != null; -assert withNflog -> libnetfilter_log != null; -assert withSQLite -> sqlite != null; -assert withPgSQL -> postgresql != null; -assert withMysql -> libmysqlclient != null; - -let inherit (lib) getDev optional optionalString; in +, withJansson ? true, jansson +, withNflog ? true, libnetfilter_log +, withSQLite ? true, sqlite +, withPgSQL ? true, postgresql +, withMysql ? true, libmysqlclient, zlib +, gnutlsSupport ? false, gnutls +}: stdenv.mkDerivation rec { - version = "1.7.5"; + version = "1.7.6"; pname = "pmacct"; src = fetchFromGitHub { owner = "pmacct"; - repo = pname; + repo = "pmacct"; rev = "v${version}"; - sha256 = "17p5isrq5w58hvmzhc6akbd37ins3c95g0rvhhdm0v33khzxmran"; + sha256 = "0x1i75hwz44siqvn4i58jgji0zwrqgn6ayv89s9m9nh3b423nsiv"; }; - nativeBuildInputs = [ autoreconfHook pkg-config libtool ]; - buildInputs = [ libpcap ] - ++ optional withJansson jansson - ++ optional withNflog libnetfilter_log - ++ optional withSQLite sqlite - ++ optional withPgSQL postgresql - ++ optional withMysql [ libmysqlclient zlib ]; + nativeBuildInputs = [ + autoreconfHook + pkg-config + libtool + ]; + buildInputs = [ + libcdada + libpcap + ] ++ lib.optional withJansson jansson + ++ lib.optional withNflog libnetfilter_log + ++ lib.optional withSQLite sqlite + ++ lib.optional withPgSQL postgresql + ++ lib.optionals withMysql [ libmysqlclient zlib ] + ++ lib.optional gnutlsSupport gnutls; - MYSQL_CONFIG = - optionalString withMysql "${getDev libmysqlclient}/bin/mysql_config"; + MYSQL_CONFIG = lib.optionalString withMysql "${lib.getDev libmysqlclient}/bin/mysql_config"; configureFlags = [ "--with-pcap-includes=${libpcap}/include" - ] ++ optional withJansson "--enable-jansson" - ++ optional withNflog "--enable-nflog" - ++ optional withSQLite "--enable-sqlite3" - ++ optional withPgSQL "--enable-pgsql" - ++ optional withMysql "--enable-mysql"; + ] ++ lib.optional withJansson "--enable-jansson" + ++ lib.optional withNflog "--enable-nflog" + ++ lib.optional withSQLite "--enable-sqlite3" + ++ lib.optional withPgSQL "--enable-pgsql" + ++ lib.optional withMysql "--enable-mysql" + ++ lib.optional gnutlsSupport "--enable-gnutls"; meta = with lib; { description = "A small set of multi-purpose passive network monitoring tools";