nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 43 lines 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 writeText, 6}: 7 8import ./versions.nix ( 9 { version, hash, ... }: 10 stdenv.mkDerivation rec { 11 pname = "zabbix-web"; 12 inherit version; 13 14 src = fetchurl { 15 url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz"; 16 inherit hash; 17 }; 18 19 phpConfig = writeText "zabbix.conf.php" '' 20 <?php 21 return require(getenv('ZABBIX_CONFIG')); 22 ?> 23 ''; 24 25 installPhase = '' 26 mkdir -p $out/share/zabbix/ 27 cp -a ui/. $out/share/zabbix/ 28 cp ${phpConfig} $out/share/zabbix/conf/zabbix.conf.php 29 ''; 30 31 meta = { 32 description = "Enterprise-class open source distributed monitoring solution (web frontend)"; 33 homepage = "https://www.zabbix.com/"; 34 license = 35 if (lib.versions.major version >= "7") then lib.licenses.agpl3Only else lib.licenses.gpl2Plus; 36 maintainers = with lib.maintainers; [ 37 bstanderline 38 mmahut 39 ]; 40 platforms = lib.platforms.linux; 41 }; 42 } 43)