forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / servers / monitoring / zabbix / agent.nix
blob02b6fb71734b6b2d35bcfa9d7ee7cb8853dd2cb1
2   lib,
3   stdenv,
4   fetchurl,
5   pkg-config,
6   libiconv,
7   openssl,
8   pcre,
9 }:
11 import ./versions.nix (
12   { version, hash, ... }:
13   stdenv.mkDerivation {
14     pname = "zabbix-agent";
15     inherit version;
17     src = fetchurl {
18       url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz";
19       inherit hash;
20     };
22     nativeBuildInputs = [ pkg-config ];
23     buildInputs = [
24       libiconv
25       openssl
26       pcre
27     ];
29     configureFlags = [
30       "--enable-agent"
31       "--enable-ipv6"
32       "--with-iconv"
33       "--with-libpcre"
34       "--with-openssl=${openssl.dev}"
35     ];
36     makeFlags = [
37       "AR:=$(AR)"
38       "RANLIB:=$(RANLIB)"
39     ];
41     postInstall = ''
42       cp conf/zabbix_agentd/*.conf $out/etc/zabbix_agentd.conf.d/
43     '';
45     meta = {
46       description = "Enterprise-class open source distributed monitoring solution (client-side agent)";
47       homepage = "https://www.zabbix.com/";
48       license =
49         if (lib.versions.major version >= "7") then lib.licenses.agpl3Only else lib.licenses.gpl2Plus;
50       maintainers = with lib.maintainers; [
51         mmahut
52         psyanticy
53       ];
54       platforms = lib.platforms.unix;
55     };
56   }