postgresql: split and fixup some referrers

This commit is contained in:
Vladimír Čunát 2015-10-14 05:47:54 +02:00
parent 04c7506f0f
commit 261961c97d
6 changed files with 17 additions and 9 deletions

View file

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
export CCARGS="-I$out/include \
-L${mysql.lib}/lib/mysql \
-L${postgresql}/lib \
-L${postgresql.lib}/lib \
-L${sqlite.out}/lib";
'';

View file

@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
] ++ optionals (postgresql != null) [
"--with-pgsql"
"--with-pgsql_incdir=${postgresql}/include"
"--with-pgsql_libdir=${postgresql}/lib"
"--with-pgsql_libdir=${postgresql.lib}/lib"
] ++ optionals (sqlite != null) [
"--with-sqlite3"
"--with-sqlite3-incdir=${sqlite.dev}/include/sqlite"

View file

@ -162,7 +162,7 @@ stdenv.mkDerivation {
# PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag
# if dependency paths contain the string "pq", which can occur in the hash.
# To prevent these failures, we need to override PostgreSQL detection.
PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql}/lib -lpq";
PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql.lib}/lib -lpq";
propagatedBuildInputs = [
xorg.libXcomposite libX11 libxcb libXext libXrender libXi

View file

@ -183,7 +183,7 @@ stdenv.mkDerivation {
# PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag
# if dependency paths contain the string "pq", which can occur in the hash.
# To prevent these failures, we need to override PostgreSQL detection.
PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql}/lib -lpq";
PSQL_LIBS = optionalString (postgresql != null) "-L${postgresql.lib}/lib -lpq";
propagatedBuildInputs = [
xlibs.libXcomposite libX11 libxcb libXext libXrender libXi

View file

@ -10,7 +10,8 @@ let
inherit sha256;
};
outputs = [ "out" "doc" ];
outputs = [ "out" "lib" "doc" ];
setOutputFlags = false; # $out retains configureFlags :-/
buildInputs =
[ zlib readline openssl ]
@ -20,8 +21,11 @@ let
makeFlags = [ "world" ];
configureFlags =
[ "--with-openssl" ]
configureFlags = [
"--with-openssl"
"--sysconfdir=/etc"
"--libdir=$(lib)/lib"
]
++ lib.optional (stdenv.isDarwin) "--with-uuid=e2fs"
++ lib.optional (!stdenv.isDarwin) "--with-ossp-uuid";
@ -36,8 +40,12 @@ let
postInstall =
''
_moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it
_moveToOutput "lib/*.a" "$out"
_moveToOutput "lib/libecpg*" "$out"
# Prevent a retained dependency on gcc-wrapper.
substituteInPlace $out/lib/pgxs/src/Makefile.global --replace ${stdenv.cc}/bin/ld ld
substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld
'';
disallowedReferences = [ stdenv.cc ];

View file

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
};
preConfigure = ''
substituteInPlace configure --replace "\$LIBDIRS" "${openssl.out}/lib ${pcre.out}/lib ${libssh.out}/lib ${postgresql92}/lib"
substituteInPlace configure --replace "\$LIBDIRS" "${openssl.out}/lib ${pcre.out}/lib ${libssh.out}/lib ${postgresql92.lib}/lib"
substituteInPlace configure --replace "\$INCDIRS" "${openssl.dev}/include ${pcre.dev}/include ${libssh.dev}/include ${postgresql92}/include"
'';