summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-01-28 08:56:27 +0100
committerMathieu Othacehe <othacehe@gnu.org>2021-01-28 13:02:24 +0100
commit86cf4c039631cdf15c4c428bf4ffe52d6cbd7d4c (patch)
treef58dc886816276c0bc9db6d1f349212a310092b2 /gnu
parent11a7bfbc466382eec17c427b8759efc90355dbb1 (diff)
downloadguix-86cf4c039631cdf15c4c428bf4ffe52d6cbd7d4c.tar.gz
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>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/databases.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index e3fc0c7ee8..78c1ee75cd 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1217,6 +1217,12 @@ developed in C/C++ to MariaDB and MySQL databases.")
                                       "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")))