Skip to content

Commit

Permalink
postgresql: Add dev output
Browse files Browse the repository at this point in the history
This reduces the closure size of postgresql.out by 72 MiB.
  • Loading branch information
edolstra committed Sep 25, 2017
1 parent b790a31 commit b0280f5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkgs/servers/sql/postgresql/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let
inherit sha256;
};

outputs = [ "out" "lib" "doc" "man" ];
outputs = [ "out" "dev" "lib" "doc" "man" ];
setOutputFlags = false; # $out retains configureFlags :-/

buildInputs =
Expand Down Expand Up @@ -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")"
Expand Down

0 comments on commit b0280f5

Please sign in to comment.