2019-12-15 18:32:18 +01:00
|
|
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
2016-08-19 09:06:40 +02:00
|
|
|
name = "postgis";
|
2021-01-10 20:08:30 +01:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2016-08-19 09:06:40 +02:00
|
|
|
maintainers = [ lsix ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = {
|
|
|
|
master =
|
2018-07-20 22:56:59 +02:00
|
|
|
{ pkgs, ... }:
|
2016-08-19 09:06:40 +02:00
|
|
|
|
|
|
|
{
|
2023-09-08 06:20:00 +02:00
|
|
|
services.postgresql = let mypg = pkgs.postgresql; in {
|
2016-08-19 09:06:40 +02:00
|
|
|
enable = true;
|
|
|
|
package = mypg;
|
2019-01-26 20:15:43 +01:00
|
|
|
extraPlugins = with mypg.pkgs; [
|
|
|
|
postgis
|
|
|
|
];
|
2017-10-11 18:06:20 +02:00
|
|
|
};
|
2016-08-19 09:06:40 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
2019-12-15 18:32:18 +01: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 09:06:40 +02:00
|
|
|
'';
|
|
|
|
})
|