Skip to content

Commit 81a229e

Browse files
committedSep 27, 2017
Revert "postgresql: Add dev output"
Firstly this creates a cycle in 9.6 .out <-> .dev after fixing the PGXS path. Secondly this breaks extension handling and the pg_config as it resolves a lot of paths relatively resulting in the following bogus output: BINDIR = /nix/store/csiq6zkn2c994kkdjln461jvgbka4yb1-postgresql-9.5.9-dev/bin DOCDIR = /nix/store/csiq6zkn2c994kkdjln461jvgbka4yb1-postgresql-9.5.9-dev/share/doc HTMLDIR = /nix/store/csiq6zkn2c994kkdjln461jvgbka4yb1-postgresql-9.5.9-dev/share/doc INCLUDEDIR = /nix/store/csiq6zkn2c994kkdjln461jvgbka4yb1-postgresql-9.5.9-dev/include PKGINCLUDEDIR = /nix/store/csiq6zkn2c994kkdjln461jvgbka4yb1-postgresql-9.5.9-dev/include INCLUDEDIR-SERVER = /nix/store/csiq6zkn2c994kkdjln461jvgbka4yb1-postgresql-9.5.9-dev/include/server LIBDIR = /nix/store/85s9m7hpfzsl93wcb5gr6ii2km9mpx3z-postgresql-9.5.9-lib/lib PKGLIBDIR = /nix/store/85s9m7hpfzsl93wcb5gr6ii2km9mpx3z-postgresql-9.5.9-lib/lib LOCALEDIR = /nix/store/csiq6zkn2c994kkdjln461jvgbka4yb1-postgresql-9.5.9-dev/share/locale MANDIR = /nix/store/csiq6zkn2c994kkdjln461jvgbka4yb1-postgresql-9.5.9-dev/share/man SHAREDIR = /nix/store/csiq6zkn2c994kkdjln461jvgbka4yb1-postgresql-9.5.9-dev/share SYSCONFDIR = /etc/postgresql PGXS = /nix/store/csiq6zkn2c994kkdjln461jvgbka4yb1-postgresql-9.5.9-dev/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--prefix=/nix/store/irqqq4g173g9xrk1mh12kxv0s1d8dbyh-postgresql-9.5.9' '--with-openssl' '--with-libxml' '--sysconfdir=/etc' '--libdir=/nix/store/85s9m7hpfzsl93wcb5gr6ii2km9mpx3z-postgresql-9.5.9-lib/lib' '--with-ossp-uuid' 'CC=gcc' CC = gcc CPPFLAGS = -D_GNU_SOURCE -I/nix/store/z6r0j2b4bcdfw3pck2x6ay0vvx0qzb92-libxml2-2.9.5-dev/include/libxml2 CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 CFLAGS_SL = -fPIC LDFLAGS = -L../../../src/common -L/nix/store/ighspl5sa3qi1zy7nkih0c9p73xjfqa6-libxml2-2.9.5/lib -Wl,--as-needed -Wl,-rpath,'/nix/store/85s9m7hpfzsl93wcb5gr6ii2km9mpx3z-postgresql-9.5.9-lib/lib',--enable-new-dtags LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgcommon -lpgport -lxml2 -lssl -lcrypto -lz -lreadline -lrt -lcrypt -ldl -lm VERSION = PostgreSQL 9.5.9 This can probably only be properly fixed by rewriting pg_config in large parts as it does not in any way respect splitting the postgres tree and assumes it can simply resolve paths relative to its location. This does not even handle symlinks: $ result-dev/bin/pg_config BINDIR = /home/robin/dev/nixpkgs-upstream/result-dev/bin DOCDIR = /home/robin/dev/nixpkgs-upstream/result-dev/share/doc HTMLDIR = /home/robin/dev/nixpkgs-upstream/result-dev/share/doc INCLUDEDIR = /home/robin/dev/nixpkgs-upstream/result-dev/include PKGINCLUDEDIR = /home/robin/dev/nixpkgs-upstream/result-dev/include INCLUDEDIR-SERVER = /home/robin/dev/nixpkgs-upstream/result-dev/include/server LIBDIR = /nix/store/85s9m7hpfzsl93wcb5gr6ii2km9mpx3z-postgresql-9.5.9-lib/lib PKGLIBDIR = /nix/store/85s9m7hpfzsl93wcb5gr6ii2km9mpx3z-postgresql-9.5.9-lib/lib LOCALEDIR = /home/robin/dev/nixpkgs-upstream/result-dev/share/locale MANDIR = /home/robin/dev/nixpkgs-upstream/result-dev/share/man SHAREDIR = /home/robin/dev/nixpkgs-upstream/result-dev/share SYSCONFDIR = /etc/postgresql PGXS = /nix/store/csiq6zkn2c994kkdjln461jvgbka4yb1-postgresql-9.5.9-dev/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--prefix=/nix/store/irqqq4g173g9xrk1mh12kxv0s1d8dbyh-postgresql-9.5.9' '--with-openssl' '--with-libxml' '--sysconfdir=/etc' '--libdir=/nix/store/85s9m7hpfzsl93wcb5gr6ii2km9mpx3z-postgresql-9.5.9-lib/lib' '--with-ossp-uuid' 'CC=gcc' CC = gcc CPPFLAGS = -D_GNU_SOURCE -I/nix/store/z6r0j2b4bcdfw3pck2x6ay0vvx0qzb92-libxml2-2.9.5-dev/include/libxml2 CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 CFLAGS_SL = -fPIC LDFLAGS = -L../../../src/common -L/nix/store/ighspl5sa3qi1zy7nkih0c9p73xjfqa6-libxml2-2.9.5/lib -Wl,--as-needed -Wl,-rpath,'/nix/store/85s9m7hpfzsl93wcb5gr6ii2km9mpx3z-postgresql-9.5.9-lib/lib',--enable-new-dtags LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgcommon -lpgport -lxml2 -lssl -lcrypto -lz -lreadline -lrt -lcrypt -ldl -lm VERSION = PostgreSQL 9.5.9 cc @edolstra Revert "bacula: fix after postgresql output splitting" This reverts commit 13c9cba. Revert "postgresql: fix pgxs dir in pg_config" This reverts commit 21998d5. Revert "rubyGems.pg: fix postgresql path" This reverts commit e253ae7. Revert "kea: fix path to pg_config" This reverts commit 086c636. Revert "php: fix build wrt. new postgres.dev build output" This reverts commit 2f23a83. Revert "gdal: fix path to pg_config" This reverts commit 032c50d. Revert "postgresql: Add dev output" This reverts commit b0280f5. (cherry picked from commit 6b05651)
1 parent ef52776 commit 81a229e

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed
 

‎pkgs/development/interpreters/php/default.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ let
9999
};
100100

101101
postgresql = {
102-
configureFlags = ["--with-pgsql=${postgresql.dev}"];
102+
configureFlags = ["--with-pgsql=${postgresql}"];
103103
buildInputs = [ postgresql ];
104104
};
105105

106106
pdo_pgsql = {
107-
configureFlags = ["--with-pdo-pgsql=${postgresql.dev}"];
107+
configureFlags = ["--with-pdo-pgsql=${postgresql}"];
108108
buildInputs = [ postgresql ];
109109
};
110110

‎pkgs/development/libraries/gdal/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
2828
"--with-png=${libpng.dev}" # optional
2929
"--with-poppler=${poppler.dev}" # optional
3030
"--with-libz=${zlib.dev}" # optional
31-
"--with-pg=${postgresql.dev}/bin/pg_config"
31+
"--with-pg=${postgresql}/bin/pg_config"
3232
"--with-mysql=${mysql.lib.dev}/bin/mysql_config"
3333
"--with-geotiff=${libgeotiff}"
3434
"--with-sqlite3=${sqlite.dev}"

‎pkgs/development/ruby-modules/gem-config/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ in
183183

184184
pg = attrs: {
185185
buildFlags = [
186-
"--with-pg-config=${postgresql.dev}/bin/pg_config"
186+
"--with-pg-config=${postgresql}/bin/pg_config"
187187
];
188188
};
189189

‎pkgs/servers/sql/postgresql/default.nix

+6-4
Original file line numberDiff line numberDiff line change
@@ -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")"

‎pkgs/tools/backup/bacula/default.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ stdenv.mkDerivation rec {
1212
# acl relies on attr, which I can't get to build on darwin
1313
++ stdenv.lib.optional (!stdenv.isDarwin) acl;
1414

15-
configureFlags = [
15+
configureFlags = [
1616
"--with-sqlite3=${sqlite.dev}"
17-
"--with-postgresql=${postgresql.dev}"
17+
"--with-postgresql=${postgresql}"
1818
];
1919

2020
postInstall = ''

‎pkgs/tools/networking/kea/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
2121
configureFlags = [
2222
"--localstatedir=/var"
2323
"--with-botan-config=${botan}/bin/botan-config-1.10"
24-
"--with-dhcp-pgsql=${postgresql.dev}/bin/pg_config"
24+
"--with-dhcp-pgsql=${postgresql}/bin/pg_config"
2525
"--with-dhcp-mysql=${mysql.client.dev}/bin/mysql_config"
2626
];
2727

0 commit comments

Comments
 (0)
Please sign in to comment.