Skip to content

Commit 442de81

Browse files
authored
Cross fixes (#374611)
2 parents 06f4b2f + f1b5c37 commit 442de81

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

pkgs/by-name/ab/abuild/package.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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 = [

pkgs/servers/monitoring/zabbix/proxy.nix

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
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

3031
let
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+
3250
in
3351
import ./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' {} +

0 commit comments

Comments
 (0)