about summary refs log tree commit diff
path: root/pkgs/servers/sql
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-09-24 04:20:00 +0000
committerMario Rodas <marsam@users.noreply.github.com>2020-09-24 04:20:00 +0000
commit27733e2bf626741fea9c33f4f5474e959b37ef76 (patch)
tree4e0dcd8354c4bc2b6c04bc7257533c32604d849b /pkgs/servers/sql
parent236eb73d1bd3bd734995c51acd2ec0611f5af64f (diff)
postgresql_13: init at 13.0
https://www.postgresql.org/docs/13/release-13.html
Diffstat (limited to 'pkgs/servers/sql')
-rw-r--r--pkgs/servers/sql/postgresql/default.nix10
-rw-r--r--pkgs/servers/sql/postgresql/patches/socketdir-in-run-13.patch13
2 files changed, 22 insertions, 1 deletions
diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix
index e759a62c2eb9a..dbe792e515753 100644
--- a/pkgs/servers/sql/postgresql/default.nix
+++ b/pkgs/servers/sql/postgresql/default.nix
@@ -64,7 +64,7 @@ let
         (if atLeast "9.6" then ./patches/hardcode-pgxs-path-96.patch       else ./patches/hardcode-pgxs-path.patch)
         ./patches/specify_pkglibdir_at_runtime.patch
         ./patches/findstring.patch
-      ] ++ lib.optional stdenv.isLinux ./patches/socketdir-in-run.patch;
+      ] ++ lib.optional stdenv.isLinux (if atLeast "13" then ./patches/socketdir-in-run-13.patch else ./patches/socketdir-in-run.patch);
 
     installTargets = [ "install-world" ];
 
@@ -221,4 +221,12 @@ in self: {
     inherit self;
   };
 
+  postgresql_13 = self.callPackage generic {
+    version = "13.0";
+    psqlSchema = "13";
+    sha256 = "15i2b7m9a9430idqdgvrcyx66cpxz0v2d81nfqcm8ss3inz51rw0";
+    this = self.postgresql_13;
+    inherit self;
+  };
+
 }
diff --git a/pkgs/servers/sql/postgresql/patches/socketdir-in-run-13.patch b/pkgs/servers/sql/postgresql/patches/socketdir-in-run-13.patch
new file mode 100644
index 0000000000000..72c778b0758ef
--- /dev/null
+++ b/pkgs/servers/sql/postgresql/patches/socketdir-in-run-13.patch
@@ -0,0 +1,13 @@
+diff --git i/src/include/pg_config_manual.h w/src/include/pg_config_manual.h
+index 8f3ec6bde1..4fc01e4a0a 100644
+--- i/src/include/pg_config_manual.h
++++ w/src/include/pg_config_manual.h
+@@ -201,7 +201,7 @@
+  * support them yet.
+  */
+ #ifndef WIN32
+-#define DEFAULT_PGSOCKET_DIR  "/tmp"
++#define DEFAULT_PGSOCKET_DIR  "/run/postgresql"
+ #else
+ #define DEFAULT_PGSOCKET_DIR ""
+ #endif