2016-08-19 08:06:40 +01:00
|
|
|
import ./make-test.nix ({ pkgs, ...} : {
|
|
|
|
name = "postgis";
|
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
|
|
maintainers = [ lsix ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = {
|
|
|
|
master =
|
2018-07-20 21:56:59 +01:00
|
|
|
{ pkgs, ... }:
|
2016-08-19 08:06:40 +01:00
|
|
|
|
|
|
|
{
|
2018-10-18 14:52:29 +01:00
|
|
|
services.postgresql = let mypg = pkgs.postgresql_11; in {
|
2016-08-19 08:06:40 +01:00
|
|
|
enable = true;
|
|
|
|
package = mypg;
|
2019-01-26 19:15:43 +00:00
|
|
|
extraPlugins = with mypg.pkgs; [
|
|
|
|
postgis
|
|
|
|
];
|
2017-10-11 17:06:20 +01:00
|
|
|
};
|
2016-08-19 08:06:40 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
startAll;
|
|
|
|
$master->waitForUnit("postgresql");
|
|
|
|
$master->sleep(10); # Hopefully this is long enough!!
|
|
|
|
$master->succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis;'");
|
2019-01-26 19:15:43 +00:00
|
|
|
$master->succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_topology;'");
|
2016-08-19 08:06:40 +01:00
|
|
|
'';
|
|
|
|
})
|