summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-09-26 08:00:37 -0500
committerGitHub <noreply@github.com>2020-09-26 08:00:37 -0500
commit69978a02e13db4586e1e855fe768911677e85666 (patch)
tree1950150086a4f009f9ccec54ae868de25840530e /pkgs/servers
parentb50431ffb2d19433240fd0953c8f0a69959e6e89 (diff)
parent8f9d4f3fc68b6776edcafb99fd8a31cce31906b0 (diff)
downloadnixpkgs-69978a02e13db4586e1e855fe768911677e85666.tar
nixpkgs-69978a02e13db4586e1e855fe768911677e85666.tar.gz
nixpkgs-69978a02e13db4586e1e855fe768911677e85666.tar.bz2
nixpkgs-69978a02e13db4586e1e855fe768911677e85666.tar.lz
nixpkgs-69978a02e13db4586e1e855fe768911677e85666.tar.xz
nixpkgs-69978a02e13db4586e1e855fe768911677e85666.tar.zst
nixpkgs-69978a02e13db4586e1e855fe768911677e85666.zip
Merge pull request #98696 from marsam/init-postgresql_13
postgresql_13: init at 13.0
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/sql/postgresql/default.nix12
-rw-r--r--pkgs/servers/sql/postgresql/patches/socketdir-in-run-13.patch13
2 files changed, 23 insertions, 2 deletions
diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix
index e759a62c2eb..bc1108ad333 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" ];
 
@@ -144,7 +144,7 @@ let
       homepage    = "https://www.postgresql.org";
       description = "A powerful, open source object-relational database system";
       license     = licenses.postgresql;
-      maintainers = with maintainers; [ ocharles thoughtpolice danbst globin ];
+      maintainers = with maintainers; [ ocharles thoughtpolice danbst globin marsam ];
       platforms   = platforms.unix;
       knownVulnerabilities = optional (!atLeast "9.4")
         "PostgreSQL versions older than 9.4 are not maintained anymore!";
@@ -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 00000000000..72c778b0758
--- /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