File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
servers/monitoring/zabbix Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ stdenv.mkDerivation (finalAttrs: {
5353
5454 patchPhase = ''
5555 substituteInPlace ./Makefile \
56- --replace 'chmod 4555' '#chmod 4555'
56+ --replace 'chmod 4555' '#chmod 4555' \
57+ --replace 'pkg-config' "$PKG_CONFIG"
5758 '' ;
5859
5960 makeFlags = [
Original file line number Diff line number Diff line change 88 openssl ,
99 pcre ,
1010 zlib ,
11+ buildPackages ,
1112 odbcSupport ? true ,
1213 unixODBC ,
1314 snmpSupport ? stdenv . buildPlatform == stdenv . hostPlatform ,
@@ -29,6 +30,23 @@ assert sqliteSupport -> !mysqlSupport && !postgresqlSupport;
2930
3031let
3132 inherit ( lib ) optional optionalString ;
33+
34+ fake_pg_config = buildPackages . writeShellScript "pg_config" ''
35+ if [[ "$1" == "--version" ]]; then
36+ $PKG_CONFIG libpq --modversion
37+ else
38+ $PKG_CONFIG libpq --variable="'' ${1//--/}"
39+ fi
40+ '' ;
41+
42+ fake_mysql_config = buildPackages . writeShellScript "mysql_config" ''
43+ if [[ "$1" == "--version" ]]; then
44+ $PKG_CONFIG mysqlclient --modversion
45+ else
46+ $PKG_CONFIG mysqlclient $@
47+ fi
48+ '' ;
49+
3250in
3351import ./versions.nix (
3452 { version , hash , ... } :
@@ -71,8 +89,8 @@ import ./versions.nix (
7189 ++ optional snmpSupport "--with-net-snmp"
7290 ++ optional sqliteSupport "--with-sqlite3=${ sqlite . dev } "
7391 ++ optional sshSupport "--with-ssh2=${ libssh2 . dev } "
74- ++ optional mysqlSupport "--with-mysql"
75- ++ optional postgresqlSupport "--with-postgresql" ;
92+ ++ optional mysqlSupport "--with-mysql= ${ fake_mysql_config } "
93+ ++ optional postgresqlSupport "--with-postgresql= ${ fake_pg_config } " ;
7694
7795 prePatch = ''
7896 find database -name data.sql -exec sed -i 's|/usr/bin/||g' {} +
You can’t perform that action at this time.
0 commit comments