Created
May 5, 2020 14:57
-
-
Save yorickvP/44e5c7983be97b462b985e782711b3d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix | |
index 85305e84266..91301d6a199 100644 | |
--- a/pkgs/servers/sql/postgresql/default.nix | |
+++ b/pkgs/servers/sql/postgresql/default.nix | |
@@ -28,7 +28,7 @@ let | |
inherit sha256; | |
}; | |
- outputs = [ "out" "lib" "doc" "man" ]; | |
+ outputs = [ "out" "lib" "doc" "man" "dev" ]; | |
setOutputFlags = false; # $out retains configureFlags :-/ | |
buildInputs = | |
@@ -44,7 +44,7 @@ let | |
buildFlags = [ "world" ]; | |
- NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; | |
+ NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2 -DVAL_CONFIGURE=\"no\" -DVAL_CPPFLAGS=\"no\" -DCONFIGURE_ARGS=\"no\""; | |
# Otherwise it retains a reference to compiler and fails; see #44767. TODO: better. | |
preConfigure = "CC=${stdenv.cc.targetPrefix}cc"; | |
@@ -80,13 +80,14 @@ let | |
postInstall = | |
'' | |
- moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it | |
+ moveToOutput "lib/pgxs" "$dev" # looks strange, but not deleting it | |
moveToOutput "lib/libpgcommon*.a" "$out" | |
moveToOutput "lib/libpgport*.a" "$out" | |
moveToOutput "lib/libecpg*" "$out" | |
+ moveToOutput "bin/pg_config" "$dev" | |
# Prevent a retained dependency on gcc-wrapper. | |
- substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld | |
+ substituteInPlace "$dev/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld | |
if [ -z "''${dontDisableStatic:-}" ]; then | |
# Remove static libraries in case dynamic are available. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment