about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/sql/postgresql
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-04-14 17:50:16 +0000
committerAlyssa Ross <hi@alyssa.is>2019-04-14 17:50:16 +0000
commit439ebf093f2779d73bc76484a36be2889cc807bf (patch)
tree7dd3b84fb345c228165c2dae6c7cdd54b433db9e /nixpkgs/pkgs/servers/sql/postgresql
parentd7417c2c1096b13fe903af802c7cf019fca14a7b (diff)
parent0c0954781e257b8b0dc49341795a2fe7d96945a3 (diff)
downloadnixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar
nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar.gz
nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar.bz2
nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar.lz
nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar.xz
nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.tar.zst
nixlib-439ebf093f2779d73bc76484a36be2889cc807bf.zip
Merge commit '0c0954781e257b8b0dc49341795a2fe7d96945a3'
Diffstat (limited to 'nixpkgs/pkgs/servers/sql/postgresql')
-rw-r--r--nixpkgs/pkgs/servers/sql/postgresql/default.nix2
-rw-r--r--nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run.patch13
2 files changed, 14 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/servers/sql/postgresql/default.nix b/nixpkgs/pkgs/servers/sql/postgresql/default.nix
index 44559885850f..b42a494ff106 100644
--- a/nixpkgs/pkgs/servers/sql/postgresql/default.nix
+++ b/nixpkgs/pkgs/servers/sql/postgresql/default.nix
@@ -60,7 +60,7 @@ let
         (if atLeast "9.6" then ./patches/less-is-more-96.patch             else ./patches/less-is-more.patch)
         (if atLeast "9.6" then ./patches/hardcode-pgxs-path-96.patch       else ./patches/hardcode-pgxs-path.patch)
         ./patches/specify_pkglibdir_at_runtime.patch
-      ];
+      ] ++ lib.optional stdenv.isLinux ./patches/socketdir-in-run.patch;
 
     installTargets = [ "install-world" ];
 
diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run.patch
new file mode 100644
index 000000000000..969f80ff8fc7
--- /dev/null
+++ b/nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run.patch
@@ -0,0 +1,13 @@
+diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
+index 743401cb96..be5c5f61d2 100644
+--- a/src/include/pg_config_manual.h
++++ b/src/include/pg_config_manual.h
+@@ -179,7 +179,7 @@
+  * here's where to twiddle it.  You can also override this at runtime
+  * with the postmaster's -k switch.
+  */
+-#define DEFAULT_PGSOCKET_DIR  "/tmp"
++#define DEFAULT_PGSOCKET_DIR  "/run/postgresql"
+ 
+ /*
+  * This is the default event source for Windows event log.