postgresql: reorganize package and its extensions (#54319)

* postgresql: reorganize package and it's extensions

Extracts some useful parts of https://github.com/NixOS/nixpkgs/pull/38698,
in particular, it's vision that postgresql plugins should be namespaced.
This commit is contained in:
Danylo Hlynskyi
2019-01-26 19:46:57 +02:00
committed by GitHub
parent 841a6838ff
commit 8e985dced0
5 changed files with 119 additions and 22 deletions

View File

@@ -7,7 +7,7 @@ with import ../lib/testing.nix { inherit system pkgs; };
with pkgs.lib;
let
postgresql-versions = pkgs.callPackages ../../pkgs/servers/sql/postgresql { };
postgresql-versions = import ../../pkgs/servers/sql/postgresql pkgs pkgs;
test-sql = pkgs.writeText "postgresql-test" ''
CREATE EXTENSION pgcrypto; -- just to check if lib loading works
CREATE TABLE sth (
@@ -29,8 +29,8 @@ let
machine = {...}:
{
services.postgresql.package = postgresql-package;
services.postgresql.enable = true;
services.postgresql.package = postgresql-package;
services.postgresqlBackup.enable = true;
services.postgresqlBackup.databases = optional (!backup-all) "postgres";