diff --git a/pkgs/servers/sql/postgresql/ext/postgis.nix b/pkgs/servers/sql/postgresql/ext/postgis.nix index 5e38cb42d19..aa31d3163c8 100644 --- a/pkgs/servers/sql/postgresql/ext/postgis.nix +++ b/pkgs/servers/sql/postgresql/ext/postgis.nix @@ -46,12 +46,17 @@ stdenv.mkDerivation rec { " \ "raster/scripts/python/Makefile"; mkdir -p $out/bin + + # postgis' build system assumes it is being installed to the same place as postgresql, and looks + # for the postgres binary relative to $PREFIX. We gently support this system using an illusion. ln -s ${postgresql}/bin/postgres $out/bin/postgres ''; # create aliases for all commands adding version information postInstall = '' + # Teardown the illusory postgres used for building; see postConfigure. rm $out/bin/postgres + for prog in $out/bin/*; do # */ ln -s $prog $prog-${version} done