Zabbix: Add LTS version 7 (#332290)

authored by Aaron Andersen and committed by GitHub e507ac8a 32dddf66

+222 -105
+12 -7
pkgs/by-name/za/zabbix-agent2-plugin-postgresql/package.nix
··· 1 - { lib, buildGoModule, fetchurl }: 1 + { 2 + lib, 3 + buildGoModule, 4 + fetchurl, 5 + }: 2 6 3 7 buildGoModule rec { 4 8 pname = "zabbix-agent2-plugin-postgresql"; 5 - version = "6.4.15"; 9 + version = "7.0.2"; 6 10 7 11 src = fetchurl { 8 12 url = "https://cdn.zabbix.com/zabbix-agent2-plugins/sources/postgresql/zabbix-agent2-plugin-postgresql-${version}.tar.gz"; 9 - hash = "sha256-9N2xN7ckfBiwWcI+C4VeHDQVrWEaeKUcjfIw7GU7K9E="; 13 + hash = "sha256-2+P0a74flxWIpZaII+V04G/szFUrnnIy+f8LfDewcx0="; 10 14 }; 11 15 12 16 vendorHash = null; 13 17 14 - meta = with lib; { 18 + meta = { 15 19 description = "Required tool for Zabbix agent integrated PostgreSQL monitoring"; 16 20 mainProgram = "postgresql"; 17 21 homepage = "https://www.zabbix.com/integrations/postgresql"; 18 - license = licenses.asl20; 19 - maintainers = with maintainers; [ gador ]; 20 - platforms = platforms.linux; 22 + license = 23 + if (lib.versions.major version >= "7") then lib.licenses.agpl3Only else lib.licenses.gpl2Plus; 24 + maintainers = with lib.maintainers; [ gador ]; 25 + platforms = lib.platforms.linux; 21 26 }; 22 27 }
+19 -5
pkgs/servers/monitoring/zabbix/agent.nix
··· 1 - { lib, stdenv, fetchurl, pkg-config, libiconv, openssl, pcre }: 1 + { 2 + lib, 3 + stdenv, 4 + fetchurl, 5 + pkg-config, 6 + libiconv, 7 + openssl, 8 + pcre, 9 + }: 2 10 3 - import ./versions.nix ({ version, hash, ... }: 11 + import ./versions.nix ( 12 + { version, hash, ... }: 4 13 stdenv.mkDerivation { 5 14 pname = "zabbix-agent"; 6 15 inherit version; ··· 36 45 meta = { 37 46 description = "Enterprise-class open source distributed monitoring solution (client-side agent)"; 38 47 homepage = "https://www.zabbix.com/"; 39 - license = lib.licenses.gpl2Plus; 40 - maintainers = with lib.maintainers; [ mmahut psyanticy ]; 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 + ]; 41 54 platforms = lib.platforms.unix; 42 55 }; 43 - }) 56 + } 57 + )
+32 -6
pkgs/servers/monitoring/zabbix/agent2.nix
··· 1 - { lib, buildGoModule, fetchurl, autoreconfHook, pkg-config, libiconv, openssl, pcre, zlib }: 1 + { 2 + lib, 3 + buildGoModule, 4 + fetchurl, 5 + autoreconfHook, 6 + pkg-config, 7 + libiconv, 8 + openssl, 9 + pcre, 10 + zlib, 11 + }: 2 12 3 - import ./versions.nix ({ version, hash, vendorHash ? throw "unsupported version ${version} for zabbix-agent2", ... }: 13 + import ./versions.nix ( 14 + { 15 + version, 16 + hash, 17 + vendorHash ? throw "unsupported version ${version} for zabbix-agent2", 18 + ... 19 + }: 4 20 buildGoModule { 5 21 pname = "zabbix-agent2"; 6 22 inherit version; ··· 14 30 15 31 inherit vendorHash; 16 32 17 - nativeBuildInputs = [ autoreconfHook pkg-config ]; 18 - buildInputs = [ libiconv openssl pcre zlib ]; 33 + nativeBuildInputs = [ 34 + autoreconfHook 35 + pkg-config 36 + ]; 37 + buildInputs = [ 38 + libiconv 39 + openssl 40 + pcre 41 + zlib 42 + ]; 19 43 20 44 inherit (buildGoModule.go) GOOS GOARCH; 21 45 ··· 59 83 meta = { 60 84 description = "Enterprise-class open source distributed monitoring solution (client-side agent)"; 61 85 homepage = "https://www.zabbix.com/"; 62 - license = lib.licenses.gpl2Plus; 86 + license = 87 + if (lib.versions.major version >= "7") then lib.licenses.agpl3Only else lib.licenses.gpl2Plus; 63 88 maintainers = with lib.maintainers; [ aanderse ]; 64 89 platforms = lib.platforms.unix; 65 90 }; 66 - }) 91 + } 92 + )
+61 -37
pkgs/servers/monitoring/zabbix/proxy.nix
··· 1 - { lib, stdenv, fetchurl, pkg-config, libevent, libiconv, openssl, pcre, zlib 2 - , odbcSupport ? true, unixODBC 3 - , snmpSupport ? stdenv.buildPlatform == stdenv.hostPlatform, net-snmp 4 - , sshSupport ? true, libssh2 5 - , sqliteSupport ? false, sqlite 6 - , mysqlSupport ? false, libmysqlclient 7 - , postgresqlSupport ? false, postgresql 1 + { 2 + lib, 3 + stdenv, 4 + fetchurl, 5 + pkg-config, 6 + libevent, 7 + libiconv, 8 + openssl, 9 + pcre, 10 + zlib, 11 + odbcSupport ? true, 12 + unixODBC, 13 + snmpSupport ? stdenv.buildPlatform == stdenv.hostPlatform, 14 + net-snmp, 15 + sshSupport ? true, 16 + libssh2, 17 + sqliteSupport ? false, 18 + sqlite, 19 + mysqlSupport ? false, 20 + libmysqlclient, 21 + postgresqlSupport ? false, 22 + postgresql, 8 23 }: 9 24 10 25 # ensure exactly one database type is selected ··· 15 30 let 16 31 inherit (lib) optional optionalString; 17 32 in 18 - import ./versions.nix ({ version, hash, ... }: 19 - stdenv.mkDerivation { 20 - pname = "zabbix-proxy"; 21 - inherit version; 33 + import ./versions.nix ( 34 + { version, hash, ... }: 35 + stdenv.mkDerivation { 36 + pname = "zabbix-proxy"; 37 + inherit version; 22 38 23 - src = fetchurl { 24 - url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz"; 25 - inherit hash; 26 - }; 39 + src = fetchurl { 40 + url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz"; 41 + inherit hash; 42 + }; 27 43 28 - nativeBuildInputs = [ pkg-config ]; 29 - buildInputs = [ 44 + nativeBuildInputs = [ pkg-config ]; 45 + buildInputs = 46 + [ 30 47 libevent 31 48 libiconv 32 49 openssl ··· 40 57 ++ optional mysqlSupport libmysqlclient 41 58 ++ optional postgresqlSupport postgresql; 42 59 43 - configureFlags = [ 60 + configureFlags = 61 + [ 44 62 "--enable-ipv6" 45 63 "--enable-proxy" 46 64 "--with-iconv" ··· 56 74 ++ optional mysqlSupport "--with-mysql" 57 75 ++ optional postgresqlSupport "--with-postgresql"; 58 76 59 - prePatch = '' 60 - find database -name data.sql -exec sed -i 's|/usr/bin/||g' {} + 61 - ''; 77 + prePatch = '' 78 + find database -name data.sql -exec sed -i 's|/usr/bin/||g' {} + 79 + ''; 62 80 63 - makeFlags = [ 64 - "AR:=$(AR)" 65 - "RANLIB:=$(RANLIB)" 66 - ]; 81 + makeFlags = [ 82 + "AR:=$(AR)" 83 + "RANLIB:=$(RANLIB)" 84 + ]; 67 85 68 - postInstall = '' 86 + postInstall = 87 + '' 69 88 mkdir -p $out/share/zabbix/database/ 70 - '' + optionalString sqliteSupport '' 89 + '' 90 + + optionalString sqliteSupport '' 71 91 mkdir -p $out/share/zabbix/database/sqlite3 72 92 cp -prvd database/sqlite3/schema.sql $out/share/zabbix/database/sqlite3/ 73 - '' + optionalString mysqlSupport '' 93 + '' 94 + + optionalString mysqlSupport '' 74 95 mkdir -p $out/share/zabbix/database/mysql 75 96 cp -prvd database/mysql/schema.sql $out/share/zabbix/database/mysql/ 76 - '' + optionalString postgresqlSupport '' 97 + '' 98 + + optionalString postgresqlSupport '' 77 99 mkdir -p $out/share/zabbix/database/postgresql 78 100 cp -prvd database/postgresql/schema.sql $out/share/zabbix/database/postgresql/ 79 101 ''; 80 102 81 - meta = with lib; { 82 - description = "Enterprise-class open source distributed monitoring solution (client-server proxy)"; 83 - homepage = "https://www.zabbix.com/"; 84 - license = licenses.gpl2Plus; 85 - maintainers = [ maintainers.mmahut ]; 86 - platforms = platforms.linux; 87 - }; 88 - }) 103 + meta = { 104 + description = "Enterprise-class open source distributed monitoring solution (client-server proxy)"; 105 + homepage = "https://www.zabbix.com/"; 106 + license = 107 + if (lib.versions.major version >= "7") then lib.licenses.agpl3Only else lib.licenses.gpl2Plus; 108 + maintainers = with lib.maintainers; [ mmahut ]; 109 + platforms = lib.platforms.linux; 110 + }; 111 + } 112 + )
+74 -40
pkgs/servers/monitoring/zabbix/server.nix
··· 1 - { lib, stdenv, fetchurl, autoreconfHook, pkg-config, curl, libevent, libiconv, libxml2, openssl, pcre, zlib 2 - , jabberSupport ? true, iksemel 3 - , ldapSupport ? true, openldap 4 - , odbcSupport ? true, unixODBC 5 - , snmpSupport ? true, net-snmp 6 - , sshSupport ? true, libssh2 7 - , mysqlSupport ? false, libmysqlclient 8 - , postgresqlSupport ? false, postgresql 9 - , ipmiSupport ? false, openipmi 1 + { 2 + lib, 3 + stdenv, 4 + fetchurl, 5 + autoreconfHook, 6 + pkg-config, 7 + curl, 8 + libevent, 9 + libiconv, 10 + libxml2, 11 + openssl, 12 + pcre, 13 + zlib, 14 + jabberSupport ? true, 15 + iksemel, 16 + ldapSupport ? true, 17 + openldap, 18 + odbcSupport ? true, 19 + unixODBC, 20 + snmpSupport ? true, 21 + net-snmp, 22 + sshSupport ? true, 23 + libssh2, 24 + mysqlSupport ? false, 25 + libmysqlclient, 26 + postgresqlSupport ? false, 27 + postgresql, 28 + ipmiSupport ? false, 29 + openipmi, 10 30 }: 11 31 12 32 # ensure exactly one primary database type is selected ··· 16 36 let 17 37 inherit (lib) optional optionalString; 18 38 in 19 - import ./versions.nix ({ version, hash, ... }: 20 - stdenv.mkDerivation { 21 - pname = "zabbix-server"; 22 - inherit version; 39 + import ./versions.nix ( 40 + { version, hash, ... }: 41 + stdenv.mkDerivation { 42 + pname = "zabbix-server"; 43 + inherit version; 23 44 24 - src = fetchurl { 25 - url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz"; 26 - inherit hash; 27 - }; 45 + src = fetchurl { 46 + url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz"; 47 + inherit hash; 48 + }; 28 49 29 - nativeBuildInputs = [ autoreconfHook pkg-config ]; 30 - buildInputs = [ 50 + nativeBuildInputs = [ 51 + autoreconfHook 52 + pkg-config 53 + ]; 54 + buildInputs = 55 + [ 31 56 curl 32 57 libevent 33 58 libiconv ··· 45 70 ++ optional postgresqlSupport postgresql 46 71 ++ optional ipmiSupport openipmi; 47 72 48 - configureFlags = [ 73 + configureFlags = 74 + [ 49 75 "--enable-ipv6" 50 76 "--enable-server" 51 77 "--with-iconv" ··· 65 91 ++ optional postgresqlSupport "--with-postgresql" 66 92 ++ optional ipmiSupport "--with-openipmi=${openipmi.dev}"; 67 93 68 - prePatch = '' 69 - find database -name data.sql -exec sed -i 's|/usr/bin/||g' {} + 70 - ''; 94 + prePatch = '' 95 + find database -name data.sql -exec sed -i 's|/usr/bin/||g' {} + 96 + ''; 71 97 72 - preAutoreconf = '' 73 - for i in $(find . -type f -name "*.m4"); do 74 - substituteInPlace $i \ 75 - --replace 'test -x "$PKG_CONFIG"' 'type -P "$PKG_CONFIG" >/dev/null' 76 - done 77 - ''; 98 + preAutoreconf = '' 99 + for i in $(find . -type f -name "*.m4"); do 100 + substituteInPlace $i \ 101 + --replace 'test -x "$PKG_CONFIG"' 'type -P "$PKG_CONFIG" >/dev/null' 102 + done 103 + ''; 78 104 79 - postInstall = '' 105 + postInstall = 106 + '' 80 107 mkdir -p $out/share/zabbix/database/ 81 108 cp -r include $out/ 82 - '' + optionalString mysqlSupport '' 109 + '' 110 + + optionalString mysqlSupport '' 83 111 mkdir -p $out/share/zabbix/database/mysql 84 112 cp -prvd database/mysql/*.sql $out/share/zabbix/database/mysql/ 85 - '' + optionalString postgresqlSupport '' 113 + '' 114 + + optionalString postgresqlSupport '' 86 115 mkdir -p $out/share/zabbix/database/postgresql 87 116 cp -prvd database/postgresql/*.sql $out/share/zabbix/database/postgresql/ 88 117 ''; 89 118 90 - meta = with lib; { 91 - description = "Enterprise-class open source distributed monitoring solution"; 92 - homepage = "https://www.zabbix.com/"; 93 - license = licenses.gpl2Plus; 94 - maintainers = with maintainers; [ mmahut psyanticy ]; 95 - platforms = platforms.linux; 96 - }; 97 - }) 119 + meta = { 120 + description = "Enterprise-class open source distributed monitoring solution"; 121 + homepage = "https://www.zabbix.com/"; 122 + license = 123 + if (lib.versions.major version >= "7") then lib.licenses.agpl3Only else lib.licenses.gpl2Plus; 124 + maintainers = with lib.maintainers; [ 125 + mmahut 126 + psyanticy 127 + ]; 128 + platforms = lib.platforms.linux; 129 + }; 130 + } 131 + )
+5
pkgs/servers/monitoring/zabbix/versions.nix
··· 1 1 generic: { 2 + v70 = generic { 3 + version = "7.0.2"; 4 + hash = "sha256-QnlBW8zvcuyF+fmrIf/o43Mf61volBYReReADpRfoYA="; 5 + vendorHash = null; 6 + }; 2 7 v64 = generic { 3 8 version = "6.4.15"; 4 9 hash = "sha256-CtmNCuzDVchijinWcop3lGUTVGS2JbiQCbmusyXBQvY=";
+18 -10
pkgs/servers/monitoring/zabbix/web.nix
··· 1 - { lib, stdenv, fetchurl, writeText }: 1 + { 2 + lib, 3 + stdenv, 4 + fetchurl, 5 + writeText, 6 + }: 2 7 3 - import ./versions.nix ({ version, hash, ... }: 8 + import ./versions.nix ( 9 + { version, hash, ... }: 4 10 stdenv.mkDerivation rec { 5 11 pname = "zabbix-web"; 6 12 inherit version; ··· 11 17 }; 12 18 13 19 phpConfig = writeText "zabbix.conf.php" '' 14 - <?php 15 - return require(getenv('ZABBIX_CONFIG')); 16 - ?> 20 + <?php 21 + return require(getenv('ZABBIX_CONFIG')); 22 + ?> 17 23 ''; 18 24 19 25 installPhase = '' ··· 22 28 cp ${phpConfig} $out/share/zabbix/conf/zabbix.conf.php 23 29 ''; 24 30 25 - meta = with lib; { 31 + meta = { 26 32 description = "Enterprise-class open source distributed monitoring solution (web frontend)"; 27 33 homepage = "https://www.zabbix.com/"; 28 - license = licenses.gpl2Plus; 29 - maintainers = [ maintainers.mmahut ]; 30 - platforms = platforms.linux; 34 + license = 35 + if (lib.versions.major version >= "7") then lib.licenses.agpl3Only else lib.licenses.gpl2Plus; 36 + maintainers = with lib.maintainers; [ mmahut ]; 37 + platforms = lib.platforms.linux; 31 38 }; 32 - }) 39 + } 40 + )
+1
pkgs/top-level/all-packages.nix
··· 25997 25997 server = server-pgsql; 25998 25998 }; 25999 25999 26000 + zabbix70 = recurseIntoAttrs (zabbixFor "v70"); 26000 26001 zabbix60 = recurseIntoAttrs (zabbixFor "v60"); 26001 26002 zabbix64 = recurseIntoAttrs (zabbixFor "v64"); 26002 26003 zabbix50 = recurseIntoAttrs (zabbixFor "v50");