2020-04-24 23:36:52 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
|
|
|
name = "postgis";
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ lsix ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = {
|
|
|
|
master =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2024-01-02 11:29:13 +00:00
|
|
|
services.postgresql = {
|
2020-04-24 23:36:52 +00:00
|
|
|
enable = true;
|
2024-01-02 11:29:13 +00:00
|
|
|
package = pkgs.postgresql;
|
|
|
|
extraPlugins = ps: with ps; [
|
2020-04-24 23:36:52 +00:00
|
|
|
postgis
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
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;'")
|
2024-01-25 14:12:00 +00:00
|
|
|
master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_raster;'")
|
2020-04-24 23:36:52 +00:00
|
|
|
master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_topology;'")
|
|
|
|
'';
|
|
|
|
})
|