1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00
nixpkgs/nixos/tests/postgis.nix
Ivan Mincik afc2f0f7bc postgresqlPackages.postgis: build minimal gdal version
This change is reducing closure size from 1.5G to
544M.
2024-01-03 11:38:02 +01:00

31 lines
777 B
Nix

import ./make-test-python.nix ({ pkgs, ...} : {
name = "postgis";
meta = with pkgs.lib.maintainers; {
maintainers = [ lsix ];
};
nodes = {
master =
{ pkgs, ... }:
{
services.postgresql = {
enable = true;
package = pkgs.postgresql;
extraPlugins = ps: with ps; [
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;'")
master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_raster;'")
master.succeed("sudo -u postgres psql -c 'CREATE EXTENSION postgis_topology;'")
'';
})