uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
43
pkgs/servers/monitoring/zabbix/agent.nix
Normal file
43
pkgs/servers/monitoring/zabbix/agent.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, libiconv, openssl, pcre }:
|
||||
|
||||
import ./versions.nix ({ version, sha256 }:
|
||||
stdenv.mkDerivation {
|
||||
pname = "zabbix-agent";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
libiconv
|
||||
openssl
|
||||
pcre
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-agent"
|
||||
"--enable-ipv6"
|
||||
"--with-iconv"
|
||||
"--with-libpcre"
|
||||
"--with-openssl=${openssl.dev}"
|
||||
];
|
||||
makeFlags = [
|
||||
"AR:=$(AR)"
|
||||
"RANLIB:=$(RANLIB)"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
cp conf/zabbix_agentd/*.conf $out/etc/zabbix_agentd.conf.d/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
|
||||
homepage = "https://www.zabbix.com/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ mmahut psyanticy ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
||||
66
pkgs/servers/monitoring/zabbix/agent2.nix
Normal file
66
pkgs/servers/monitoring/zabbix/agent2.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{ lib, buildGoModule, fetchurl, autoreconfHook, pkg-config, libiconv, openssl, pcre, zlib }:
|
||||
|
||||
import ./versions.nix ({ version, sha256 }:
|
||||
buildGoModule {
|
||||
pname = "zabbix-agent2";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
modRoot = "src/go";
|
||||
|
||||
vendorSha256 = "1417qi061xc4m55z0vz420fr7qpi24kw5yj9wq7iic92smakgkjn";
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
buildInputs = [ libiconv openssl pcre zlib ];
|
||||
|
||||
inherit (buildGoModule.go) GOOS GOARCH;
|
||||
|
||||
# need to provide GO* env variables & patch for reproducibility
|
||||
postPatch = ''
|
||||
substituteInPlace src/go/Makefile.am \
|
||||
--replace '`go env GOOS`' "$GOOS" \
|
||||
--replace '`go env GOARCH`' "$GOARCH" \
|
||||
--replace '`date +%H:%M:%S`' "00:00:00" \
|
||||
--replace '`date +"%b %_d %Y"`' "Jan 1 1970"
|
||||
'';
|
||||
|
||||
# manually configure the c dependencies
|
||||
preConfigure = ''
|
||||
./configure \
|
||||
--prefix=${placeholder "out"} \
|
||||
--enable-agent2 \
|
||||
--enable-ipv6 \
|
||||
--with-iconv \
|
||||
--with-libpcre \
|
||||
--with-openssl=${openssl.dev}
|
||||
'';
|
||||
|
||||
# zabbix build process is complex to get right in nix...
|
||||
# use automake to build the go project ensuring proper access to the go vendor directory
|
||||
buildPhase = ''
|
||||
cd ../..
|
||||
make
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/sbin
|
||||
|
||||
install -Dm0644 src/go/conf/zabbix_agent2.conf $out/etc/zabbix_agent2.conf
|
||||
install -Dm0755 src/go/bin/zabbix_agent2 $out/bin/zabbix_agent2
|
||||
|
||||
# create a symlink which is compatible with the zabbixAgent module
|
||||
ln -s $out/bin/zabbix_agent2 $out/sbin/zabbix_agentd
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An enterprise-class open source distributed monitoring solution (client-side agent)";
|
||||
homepage = "https://www.zabbix.com/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = [ maintainers.aanderse ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
||||
83
pkgs/servers/monitoring/zabbix/proxy.nix
Normal file
83
pkgs/servers/monitoring/zabbix/proxy.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, libevent, libiconv, openssl, pcre, zlib
|
||||
, odbcSupport ? true, unixODBC
|
||||
, snmpSupport ? true, net-snmp
|
||||
, sshSupport ? true, libssh2
|
||||
, sqliteSupport ? false, sqlite
|
||||
, mysqlSupport ? false, libmysqlclient
|
||||
, postgresqlSupport ? false, postgresql
|
||||
}:
|
||||
|
||||
# ensure exactly one database type is selected
|
||||
assert mysqlSupport -> !postgresqlSupport && !sqliteSupport;
|
||||
assert postgresqlSupport -> !mysqlSupport && !sqliteSupport;
|
||||
assert sqliteSupport -> !mysqlSupport && !postgresqlSupport;
|
||||
|
||||
let
|
||||
inherit (lib) optional optionalString;
|
||||
in
|
||||
import ./versions.nix ({ version, sha256 }:
|
||||
stdenv.mkDerivation {
|
||||
pname = "zabbix-proxy";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
libevent
|
||||
libiconv
|
||||
openssl
|
||||
pcre
|
||||
zlib
|
||||
]
|
||||
++ optional odbcSupport unixODBC
|
||||
++ optional snmpSupport net-snmp
|
||||
++ optional sqliteSupport sqlite
|
||||
++ optional sshSupport libssh2
|
||||
++ optional mysqlSupport libmysqlclient
|
||||
++ optional postgresqlSupport postgresql;
|
||||
|
||||
configureFlags = [
|
||||
"--enable-ipv6"
|
||||
"--enable-proxy"
|
||||
"--with-iconv"
|
||||
"--with-libevent"
|
||||
"--with-libpcre"
|
||||
"--with-openssl=${openssl.dev}"
|
||||
"--with-zlib=${zlib}"
|
||||
]
|
||||
++ optional odbcSupport "--with-unixodbc"
|
||||
++ optional snmpSupport "--with-net-snmp"
|
||||
++ optional sqliteSupport "--with-sqlite3=${sqlite.dev}"
|
||||
++ optional sshSupport "--with-ssh2=${libssh2.dev}"
|
||||
++ optional mysqlSupport "--with-mysql"
|
||||
++ optional postgresqlSupport "--with-postgresql";
|
||||
|
||||
prePatch = ''
|
||||
find database -name data.sql -exec sed -i 's|/usr/bin/||g' {} +
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/zabbix/database/
|
||||
'' + optionalString sqliteSupport ''
|
||||
mkdir -p $out/share/zabbix/database/sqlite3
|
||||
cp -prvd database/sqlite3/schema.sql $out/share/zabbix/database/sqlite3/
|
||||
'' + optionalString mysqlSupport ''
|
||||
mkdir -p $out/share/zabbix/database/mysql
|
||||
cp -prvd database/mysql/schema.sql $out/share/zabbix/database/mysql/
|
||||
'' + optionalString postgresqlSupport ''
|
||||
mkdir -p $out/share/zabbix/database/postgresql
|
||||
cp -prvd database/postgresql/schema.sql $out/share/zabbix/database/postgresql/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An enterprise-class open source distributed monitoring solution (client-server proxy)";
|
||||
homepage = "https://www.zabbix.com/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.mmahut ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
||||
97
pkgs/servers/monitoring/zabbix/server.nix
Normal file
97
pkgs/servers/monitoring/zabbix/server.nix
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, curl, libevent, libiconv, libxml2, openssl, pcre, zlib
|
||||
, jabberSupport ? true, iksemel
|
||||
, ldapSupport ? true, openldap
|
||||
, odbcSupport ? true, unixODBC
|
||||
, snmpSupport ? true, net-snmp
|
||||
, sshSupport ? true, libssh2
|
||||
, mysqlSupport ? false, libmysqlclient
|
||||
, postgresqlSupport ? false, postgresql
|
||||
, ipmiSupport ? false, openipmi
|
||||
}:
|
||||
|
||||
# ensure exactly one primary database type is selected
|
||||
assert mysqlSupport -> !postgresqlSupport;
|
||||
assert postgresqlSupport -> !mysqlSupport;
|
||||
|
||||
let
|
||||
inherit (lib) optional optionalString;
|
||||
in
|
||||
import ./versions.nix ({ version, sha256 }:
|
||||
stdenv.mkDerivation {
|
||||
pname = "zabbix-server";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
buildInputs = [
|
||||
curl
|
||||
libevent
|
||||
libiconv
|
||||
libxml2
|
||||
openssl
|
||||
pcre
|
||||
zlib
|
||||
]
|
||||
++ optional odbcSupport unixODBC
|
||||
++ optional jabberSupport iksemel
|
||||
++ optional ldapSupport openldap
|
||||
++ optional snmpSupport net-snmp
|
||||
++ optional sshSupport libssh2
|
||||
++ optional mysqlSupport libmysqlclient
|
||||
++ optional postgresqlSupport postgresql
|
||||
++ optional ipmiSupport openipmi;
|
||||
|
||||
configureFlags = [
|
||||
"--enable-ipv6"
|
||||
"--enable-server"
|
||||
"--with-iconv"
|
||||
"--with-libcurl"
|
||||
"--with-libevent"
|
||||
"--with-libpcre"
|
||||
"--with-libxml2"
|
||||
"--with-openssl=${openssl.dev}"
|
||||
"--with-zlib=${zlib}"
|
||||
]
|
||||
++ optional odbcSupport "--with-unixodbc"
|
||||
++ optional jabberSupport "--with-jabber"
|
||||
++ optional ldapSupport "--with-ldap=${openldap.dev}"
|
||||
++ optional snmpSupport "--with-net-snmp"
|
||||
++ optional sshSupport "--with-ssh2=${libssh2.dev}"
|
||||
++ optional mysqlSupport "--with-mysql"
|
||||
++ optional postgresqlSupport "--with-postgresql"
|
||||
++ optional ipmiSupport "--with-openipmi=${openipmi.dev}";
|
||||
|
||||
prePatch = ''
|
||||
find database -name data.sql -exec sed -i 's|/usr/bin/||g' {} +
|
||||
'';
|
||||
|
||||
preAutoreconf = ''
|
||||
for i in $(find . -type f -name "*.m4"); do
|
||||
substituteInPlace $i \
|
||||
--replace 'test -x "$PKG_CONFIG"' 'type -P "$PKG_CONFIG" >/dev/null'
|
||||
done
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/zabbix/database/
|
||||
cp -r include $out/
|
||||
'' + optionalString mysqlSupport ''
|
||||
mkdir -p $out/share/zabbix/database/mysql
|
||||
cp -prvd database/mysql/*.sql $out/share/zabbix/database/mysql/
|
||||
'' + optionalString postgresqlSupport ''
|
||||
mkdir -p $out/share/zabbix/database/postgresql
|
||||
cp -prvd database/postgresql/*.sql $out/share/zabbix/database/postgresql/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An enterprise-class open source distributed monitoring solution";
|
||||
homepage = "https://www.zabbix.com/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ mmahut psyanticy ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
||||
11
pkgs/servers/monitoring/zabbix/versions.nix
Normal file
11
pkgs/servers/monitoring/zabbix/versions.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
generic: {
|
||||
v50 = generic {
|
||||
version = "5.0.19";
|
||||
sha256 = "sha256-esa7DczdaWiG8Ru9py8HlOhvhkjV8IQjMwuiJ6F5c6E=";
|
||||
};
|
||||
|
||||
v40 = generic {
|
||||
version = "4.0.37";
|
||||
sha256 = "sha256-Wuexl8I2zA63jyTRDe8bMSP++imwSOxc4LEdUnH8jps=";
|
||||
};
|
||||
}
|
||||
32
pkgs/servers/monitoring/zabbix/web.nix
Normal file
32
pkgs/servers/monitoring/zabbix/web.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchurl, writeText }:
|
||||
|
||||
import ./versions.nix ({ version, sha256 }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zabbix-web";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.zabbix.com/zabbix/sources/stable/${lib.versions.majorMinor version}/zabbix-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
phpConfig = writeText "zabbix.conf.php" ''
|
||||
<?php
|
||||
return require(getenv('ZABBIX_CONFIG'));
|
||||
?>
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/zabbix/
|
||||
cp -a ${if lib.versionAtLeast version "5.0.0" then "ui/." else "frontends/php/."} $out/share/zabbix/
|
||||
cp ${phpConfig} $out/share/zabbix/conf/zabbix.conf.php
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An enterprise-class open source distributed monitoring solution (web frontend)";
|
||||
homepage = "https://www.zabbix.com/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.mmahut ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue