Merge pull request #44083 from dingxiangfei2009/cross-compiling-postgresql

Allow postgresql to cross compile
This commit is contained in:
John Ericson
2018-08-03 14:44:55 -04:00
committed by GitHub
3 changed files with 22 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
{ lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, libxml2, makeWrapper }:
{ lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, libxml2, makeWrapper, tzdata }:
let
@@ -22,14 +22,16 @@ let
makeFlags = [ "world" ];
NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ];
configureFlags = [
"--with-openssl"
"--with-libxml"
"--sysconfdir=/etc"
"--libdir=$(lib)/lib"
]
++ lib.optional (stdenv.isDarwin) "--with-uuid=e2fs"
++ lib.optional (!stdenv.isDarwin) "--with-ossp-uuid";
"--with-system-tzdata=${tzdata}"
(if stdenv.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid")
];
patches =
[ (if atLeast "9.4" then ./disable-resolve_symlinks-94.patch else ./disable-resolve_symlinks.patch)