gnu: postgresql: Set default socket directory.

* gnu/packages/databases.scm (postgresql)[arguments]: Add 'set-socket-dir
phase.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This commit is contained in:
Mathieu Othacehe 2021-01-28 08:56:27 +01:00
parent 11a7bfbc46
commit 86cf4c0396
No known key found for this signature in database
GPG key ID: 8354763531769CA6

View file

@ -1217,6 +1217,12 @@ (define-public postgresql-13
"src/bin/psql/command.c")
(("/bin/sh") (which "sh")))
#t))
(add-before 'configure 'set-socket-dir
(lambda _
(substitute* '("src/include/pg_config_manual.h")
(("DEFAULT_PGSOCKET_DIR[^\n]*")
"DEFAULT_PGSOCKET_DIR \"/var/run/postgresql\""))
#t))
(add-after 'build 'build-contrib
(lambda _
(invoke "make" "-C" "contrib")))