@@ -11,7 +11,7 @@ let
1111 inherit sha256;
1212 };
1313
14− outputs = [ "out" "dev" "lib" "doc" "man" ];
14+ outputs = [ "out" "lib" "doc" "man" ];
1515 setOutputFlags = false; # $out retains configureFlags :-/
1616
1717 buildInputs =
@@ -46,16 +46,18 @@ let
4646 let path = if atLeast "9.6" then "src/common/config_info.c" else "src/bin/pg_config/pg_config.c"; in
4747 ''
4848 # Hardcode the path to pgxs so pg_config returns the path in $out
49− substituteInPlace "${path}" --replace HARDCODED_PGXS_PATH $dev/lib
49+ substituteInPlace "${path}" --replace HARDCODED_PGXS_PATH $out/lib
5050 '';
5151
5252 postInstall =
5353 ''
54− moveToOutput "bin/pg_config" "$dev"
55− moveToOutput "lib/pgxs" "$dev" # looks strange, but not deleting it
54+ moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it
5655 moveToOutput "lib/*.a" "$out"
5756 moveToOutput "lib/libecpg*" "$out"
5857
58+ # Prevent a retained dependency on gcc-wrapper.
59+ substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld
60+
5961 # Remove static libraries in case dynamic are available.
6062 for i in $out/lib/*.a; do
6163 name="$(basename "$i")"