From 92a015d35d0450708438f68466027707b18188bd Mon Sep 17 00:00:00 2001 From: danbst Date: Mon, 22 Jul 2019 02:57:16 +0300 Subject: nixos/postgresql: support 0750 for data directory This is rework of part of https://github.com/NixOS/nixpkgs/pull/46670. My usecase was to be able to inspect PG datadir as wheel user. PG11 now allows starting server with 0750 mask for data dir. `groupAccess = true` now does this automatically. The only thing you have to do is to set group ownership. For PG10 and below, I've described a hack how this can be done. Before this PR hack was impossible. The hack isn't ideal, because there is short period of time when dir mode is 0700, so I didn't want to make it official. Test/example is present too. --- pkgs/servers/sql/postgresql/default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs/servers/sql/postgresql') diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index 440ee15a518..e2703a549d3 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -157,6 +157,9 @@ let cp --target-directory=$out/bin ${postgresql}/bin/{postgres,pg_config,pg_ctl} wrapProgram $out/bin/postgres --set NIX_PGLIBDIR $out/lib ''; + + passthru.version = postgresql.version; + passthru.psqlSchema = postgresql.psqlSchema; }; in self: { -- cgit 1.4.1