2019-12-15 20:32:18 +03:00
|
|
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
2016-08-19 10:06:40 +03:00
|
|
|
name = "postgis";
|
2021-01-10 22:08:30 +03:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2016-08-19 10:06:40 +03:00
|
|
|
maintainers = [ lsix ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = {
|
|
|
|
master =
|
2018-07-20 23:56:59 +03:00
|
|
|
{ pkgs, ... }:
|
2016-08-19 10:06:40 +03:00
|
|
|
|
|
|
|
{
|
2023-09-26 23:49:44 +03:00
|
|
|
services.postgresql = {
|
2016-08-19 10:06:40 +03:00
|
|
|
enable = true;
|
2023-09-26 23:49:44 +03:00
|
|
|
package = pkgs.postgresql;
|
|
|
|
extraPlugins = ps: with ps; [
|
2019-01-26 22:15:43 +03:00
|
|
|
postgis
|
|
|
|
];
|
2017-10-11 19:06:20 +03:00
|
|
|
};
|
2016-08-19 10:06:40 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
2019-12-15 20:32:18 +03:00
|
|
|
start_all()
|
|
|
|
master.wait_for_unit("postgresql")
|
|
|
|
master.sleep(10) # Hopefully this is long enough!!
|
|
|
|
master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis;'")
|
|
|
|
master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_topology;'")
|
2016-08-19 10:06:40 +03:00
|
|
|
'';
|
|
|
|
})
|