From 128a446c59872f1df38070655a903b885293b995 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 18 Nov 2018 15:33:37 -0800 Subject: postgresql_11: 11.0 -> 11.1 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/postgresql/versions --- pkgs/servers/sql/postgresql/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkgs/servers/sql') diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index f8bf08b55b7d..dce158ebed9d 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -130,9 +130,9 @@ in { }; postgresql_11 = common { - version = "11.0"; - psqlSchema = "11.0"; - sha256 = "0szk9ssfych1wlpyqxz3z6dllg1l6m5labpii8c2r463s01vm6xz"; + version = "11.1"; + psqlSchema = "11.1"; + sha256 = "026v0sicsh7avzi45waf8shcbhivyxmi7qgn9fd1x0vl520mx0ch"; }; } -- cgit 1.4.1 From d04fedd71500703e86486f31e4a1b1289fb7c081 Mon Sep 17 00:00:00 2001 From: Domen Kožar Date: Tue, 27 Nov 2018 19:16:21 +0000 Subject: postgresql: Enable systemd integration for 9.6+ This allows, finally, proper detection when postgresql is ready to accept connections. Until now, it was possible that services depending on postgresql would fail in a race condition trying to connect to postgresql. --- nixos/modules/services/databases/postgresql.nix | 3 +++ pkgs/servers/sql/postgresql/default.nix | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'pkgs/servers/sql') diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index f592be0e768b..aeab445a9983 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -238,6 +238,9 @@ in User = "postgres"; Group = "postgres"; PermissionsStartOnly = true; + Type = if lib.versionAtLeast cfg.package.version "9.6" + then "notify" + else "simple"; # Shut down Postgres using SIGINT ("Fast Shutdown mode"). See # http://www.postgresql.org/docs/current/static/server-shutdown.html diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index dce158ebed9d..c91a9bb8b9ab 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -1,10 +1,11 @@ -{ lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, libxml2, makeWrapper, tzdata }: +{ lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, libxml2, makeWrapper, tzdata, systemd }: let common = { version, sha256, psqlSchema }: let atLeast = lib.versionAtLeast version; in stdenv.mkDerivation (rec { name = "postgresql-${version}"; + inherit version; src = fetchurl { url = "mirror://postgresql/source/v${version}/${name}.tar.bz2"; @@ -15,7 +16,7 @@ let setOutputFlags = false; # $out retains configureFlags :-/ buildInputs = - [ zlib readline openssl libxml2 makeWrapper ] + [ zlib readline openssl libxml2 makeWrapper systemd ] ++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ]; enableParallelBuilding = true; @@ -33,6 +34,7 @@ let "--sysconfdir=/etc" "--libdir=$(lib)/lib" "--with-system-tzdata=${tzdata}/share/zoneinfo" + (lib.optionalString (atLeast "9.6" && !stdenv.isDarwin) "--with-systemd") (if stdenv.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") ]; -- cgit 1.4.1 From f31ea5a2d58c2487b4927bd2e59ae3269ae24368 Mon Sep 17 00:00:00 2001 From: Domen Kožar Date: Tue, 27 Nov 2018 19:38:54 +0000 Subject: postgresql: conditionalize systemd (on darwin) --- pkgs/servers/sql/postgresql/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkgs/servers/sql') diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index c91a9bb8b9ab..16eeac038111 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -16,7 +16,8 @@ let setOutputFlags = false; # $out retains configureFlags :-/ buildInputs = - [ zlib readline openssl libxml2 makeWrapper systemd ] + [ zlib readline openssl libxml2 makeWrapper ] + ++ lib.optionals (atLeast "9.6" && !stdenv.isDarwin) [ systemd ] ++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ]; enableParallelBuilding = true; -- cgit 1.4.1 From c41c195dc52a88810f6520d7ed3dc699a9f4b0b1 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 27 Nov 2018 20:13:23 +0000 Subject: postgresql: disable parallel building on Darwin There have been multiple reports of this failing. Fixes https://github.com/NixOS/nixpkgs/issues/51093. --- pkgs/servers/sql/postgresql/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/servers/sql') diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index 16eeac038111..480b5327028b 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -20,7 +20,7 @@ let ++ lib.optionals (atLeast "9.6" && !stdenv.isDarwin) [ systemd ] ++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ]; - enableParallelBuilding = true; + enableParallelBuilding = !stdenv.isDarwin; makeFlags = [ "world" ]; -- cgit 1.4.1