From 261961c97dfe4085eec1f7b4a902198fc3d8ddeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 14 Oct 2015 05:47:54 +0200 Subject: [PATCH] postgresql: split and fixup some referrers --- pkgs/development/compilers/urweb/default.nix | 2 +- .../libraries/libdbi-drivers/default.nix | 2 +- pkgs/development/libraries/qt-5/5.4/qtbase.nix | 2 +- .../libraries/qt-5/5.5/qtbase/default.nix | 2 +- pkgs/servers/sql/postgresql/default.nix | 16 ++++++++++++---- pkgs/tools/security/thc-hydra/default.nix | 2 +- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix index 9bdc3131e6a..e34d58efd01 100644 --- a/pkgs/development/compilers/urweb/default.nix +++ b/pkgs/development/compilers/urweb/default.nix @@ -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"; ''; diff --git a/pkgs/development/libraries/libdbi-drivers/default.nix b/pkgs/development/libraries/libdbi-drivers/default.nix index da2919f6ee9..f64174778b2 100644 --- a/pkgs/development/libraries/libdbi-drivers/default.nix +++ b/pkgs/development/libraries/libdbi-drivers/default.nix @@ -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" diff --git a/pkgs/development/libraries/qt-5/5.4/qtbase.nix b/pkgs/development/libraries/qt-5/5.4/qtbase.nix index 652814a3fd1..2b7052e1ca6 100644 --- a/pkgs/development/libraries/qt-5/5.4/qtbase.nix +++ b/pkgs/development/libraries/qt-5/5.4/qtbase.nix @@ -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 diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix index 1aba5c98d9c..2bafa8deba4 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix @@ -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 diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index cf4519a8232..09f3997fa14 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -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 ]; diff --git a/pkgs/tools/security/thc-hydra/default.nix b/pkgs/tools/security/thc-hydra/default.nix index 26afe5e2990..71fbbf55a7a 100644 --- a/pkgs/tools/security/thc-hydra/default.nix +++ b/pkgs/tools/security/thc-hydra/default.nix @@ -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" '';