about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/system/syslog-ng/default.nix
blob: 3c387cf28708ed55c266823fed3010b43ed24a36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{ lib
, stdenv
, fetchFromGitHub
, autoconf-archive
, autoreconfHook
, bison
, flex
, openssl
, libcap
, curl
, which
, eventlog
, pkg-config
, glib
, hiredis
, systemd
, perl
, python3
, riemann_c_client
, protobufc
, pcre
, paho-mqtt-c
, libnet
, json_c
, libuuid
, libivykis
, libxslt
, docbook_xsl
, pcre2
, mongoc
, rabbitmq-c
, libesmtp
, rdkafka
}:
let
  python-deps = ps: with ps; [
    pip
    boto3
    botocore
    cachetools
    certifi
    charset-normalizer
    google-auth
    idna
    kubernetes
    oauthlib
    pyasn1
    pyasn1-modules
    python-dateutil
    pyyaml
    requests
    requests-oauthlib
    rsa
    six
    urllib3
    websocket-client
    ply
  ];
  myPy3 = (python3.withPackages python-deps);
in
stdenv.mkDerivation rec {
  pname = "syslog-ng";
  version = "4.4.0";

  src = fetchFromGitHub {
    owner = "syslog-ng";
    repo = "syslog-ng";
    rev = "syslog-ng-${version}";
    hash = "sha256-NXwd4dyPfnHO3yjl3GPAMQYqenfpp7xFOil2G1e66w4=";
  };
  nativeBuildInputs = [ autoreconfHook autoconf-archive pkg-config which bison flex libxslt perl myPy3 ];

  buildInputs = [
    libcap
    curl
    openssl
    eventlog
    glib
    myPy3
    systemd
    riemann_c_client
    protobufc
    pcre
    libnet
    json_c
    libuuid
    libivykis
    mongoc
    rabbitmq-c
    libesmtp
    pcre2
    paho-mqtt-c
    hiredis
    rdkafka
  ];

  configureFlags = [
    "--enable-manpages"
    "--with-docbook=${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl"
    "--enable-dynamic-linking"
    "--enable-systemd"
    "--enable-smtp"
    "--with-python-packages=system"
    "--with-hiredis=system"
    "--with-ivykis=system"
    "--with-librabbitmq-client=system"
    "--with-mongoc=system"
    "--with-jsonc=system"
    "--with-systemd-journal=system"
    "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
    "--without-compile-date"
  ];

  outputs = [ "out" "man" ];

  enableParallelBuilding = true;

  meta = with lib; {
    homepage = "https://www.syslog-ng.com";
    description = "Next-generation syslogd with advanced networking and filtering capabilities";
    license = with licenses; [ gpl2Plus lgpl21Plus ];
    maintainers = with maintainers; [ vifino ];
    platforms = platforms.linux;
  };
}