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 \ export CCARGS="-I$out/include \
-L${mysql.lib}/lib/mysql \ -L${mysql.lib}/lib/mysql \
-L${postgresql}/lib \ -L${postgresql.lib}/lib \
-L${sqlite.out}/lib"; -L${sqlite.out}/lib";
''; '';

View File

@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
] ++ optionals (postgresql != null) [ ] ++ optionals (postgresql != null) [
"--with-pgsql" "--with-pgsql"
"--with-pgsql_incdir=${postgresql}/include" "--with-pgsql_incdir=${postgresql}/include"
"--with-pgsql_libdir=${postgresql}/lib" "--with-pgsql_libdir=${postgresql.lib}/lib"
] ++ optionals (sqlite != null) [ ] ++ optionals (sqlite != null) [
"--with-sqlite3" "--with-sqlite3"
"--with-sqlite3-incdir=${sqlite.dev}/include/sqlite" "--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 # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag
# if dependency paths contain the string "pq", which can occur in the hash. # if dependency paths contain the string "pq", which can occur in the hash.
# To prevent these failures, we need to override PostgreSQL detection. # 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 = [ propagatedBuildInputs = [
xorg.libXcomposite libX11 libxcb libXext libXrender libXi 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 # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag
# if dependency paths contain the string "pq", which can occur in the hash. # if dependency paths contain the string "pq", which can occur in the hash.
# To prevent these failures, we need to override PostgreSQL detection. # 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 = [ propagatedBuildInputs = [
xlibs.libXcomposite libX11 libxcb libXext libXrender libXi xlibs.libXcomposite libX11 libxcb libXext libXrender libXi

View File

@ -10,7 +10,8 @@ let
inherit sha256; inherit sha256;
}; };
outputs = [ "out" "doc" ]; outputs = [ "out" "lib" "doc" ];
setOutputFlags = false; # $out retains configureFlags :-/
buildInputs = buildInputs =
[ zlib readline openssl ] [ zlib readline openssl ]
@ -20,8 +21,11 @@ let
makeFlags = [ "world" ]; makeFlags = [ "world" ];
configureFlags = configureFlags = [
[ "--with-openssl" ] "--with-openssl"
"--sysconfdir=/etc"
"--libdir=$(lib)/lib"
]
++ lib.optional (stdenv.isDarwin) "--with-uuid=e2fs" ++ lib.optional (stdenv.isDarwin) "--with-uuid=e2fs"
++ lib.optional (!stdenv.isDarwin) "--with-ossp-uuid"; ++ lib.optional (!stdenv.isDarwin) "--with-ossp-uuid";
@ -36,8 +40,12 @@ let
postInstall = 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. # 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 ]; disallowedReferences = [ stdenv.cc ];

View File

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
}; };
preConfigure = '' 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" substituteInPlace configure --replace "\$INCDIRS" "${openssl.dev}/include ${pcre.dev}/include ${libssh.dev}/include ${postgresql92}/include"
''; '';