1 import ./make-test-python.nix ({ pkgs, ...} : {
3 meta = with pkgs.lib.maintainers; {
4 maintainers = [ lsix ];
12 services.postgresql = {
14 package = pkgs.postgresql;
15 extraPlugins = ps: with ps; [
24 master.wait_for_unit("postgresql")
25 master.sleep(10) # Hopefully this is long enough!!
26 master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis;'")
27 master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_raster;'")
28 master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_topology;'")
29 master.succeed("sudo -u postgres psql -c 'select postgis_version();'")
30 master.succeed("[ \"$(sudo -u postgres psql --no-psqlrc --tuples-only -c 'select postgis_version();')\" = \" ${
31 pkgs.lib.versions.major pkgs.postgis.version
33 pkgs.lib.versions.minor pkgs.postgis.version
34 } USE_GEOS=1 USE_PROJ=1 USE_STATS=1\" ]")
35 # st_makepoint goes through c code
36 master.succeed("sudo -u postgres psql --no-psqlrc --tuples-only -c 'select st_makepoint(1, 1)'")