diff --git a/pkgs/development/libraries/libcdada/default.nix b/pkgs/development/libraries/libcdada/default.nix new file mode 100644 index 000000000000..94976c1be46a --- /dev/null +++ b/pkgs/development/libraries/libcdada/default.nix @@ -0,0 +1,37 @@ +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +}: + +stdenv.mkDerivation rec { + pname = "libcdada"; + version = "0.3.5"; + + src = fetchFromGitHub { + owner = "msune"; + repo = "libcdada"; + rev = "v${version}"; + sha256 = "0vcsf3s4fbw2w33jjc8b509kc0xb6ld58l8wfxgqwjqx5icfg1ps"; + }; + + nativeBuildInputs = [ + autoreconfHook + ]; + + configureFlags = [ + "--without-tests" + "--without-examples" + ]; + + meta = with lib; { + description = "Library for basic data structures in C"; + longDescription = '' + Basic data structures in C: list, set, map/hashtable, queue... (libstdc++ wrapper) + ''; + homepage = "https://github.com/msune/libcdada"; + license = licenses.bsd2; + maintainers = with maintainers; [ _0x4A6F ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/networking/pmacct/default.nix b/pkgs/tools/networking/pmacct/default.nix index 9cb8c0b88f73..86f1af029df0 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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1320ff88bdc5..c30fc006bec3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16954,6 +16954,8 @@ with pkgs; libcerf = callPackage ../development/libraries/libcerf {}; + libcdada = callPackage ../development/libraries/libcdada { }; + libcdaudio = callPackage ../development/libraries/libcdaudio { }; libcddb = callPackage ../development/libraries/libcddb { };