postgresql: Add dev output

This reduces the closure size of postgresql.out by 72 MiB.
This commit is contained in:
Eelco Dolstra 2017-09-25 15:24:28 +02:00
parent b790a31204
commit b0280f598e
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE

View File

@ -11,7 +11,7 @@ let
inherit sha256;
};
outputs = [ "out" "lib" "doc" "man" ];
outputs = [ "out" "dev" "lib" "doc" "man" ];
setOutputFlags = false; # $out retains configureFlags :-/
buildInputs =
@ -51,13 +51,11 @@ let
postInstall =
''
moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it
moveToOutput "bin/pg_config" "$dev"
moveToOutput "lib/pgxs" "$dev" # 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
# Remove static libraries in case dynamic are available.
for i in $out/lib/*.a; do
name="$(basename "$i")"