postgis: add v2.4.0

Add postgis 2.4.0

doesn't remove v2.3.1. There are some big change in 2.4 that people may
don't want. see https://postgis.net/docs/release_notes.html#idm41021

fix test call

modify following recommandation of lsix
This commit is contained in:
Rémi Desgrange
2017-10-11 18:06:20 +02:00
committed by Remi Desgrange
parent 659c7484d1
commit 8dcaa5b313
3 changed files with 30 additions and 7 deletions

View File

@@ -109,4 +109,30 @@ in rec {
'';
});
v_2_4_0 = pgDerivationBaseNewer.merge ( fix : {
version = "2.4.0";
sha256 = "02baa90f04da41e04b6c18eedfda53110c45ae943d4e65050f6d202f7de07d29";
sql_srcs = ["postgis.sql" "spatial_ref_sys.sql"];
builtInputs = [gdal json_c pkgconfig];
# postgis config directory assumes /include /lib from the same root for json-c library
NIX_LDFLAGS = "-L${stdenv.lib.getLib json_c}/lib";
dontDisableStatic = true;
preConfigure = ''
sed -i 's@/usr/bin/file@${file}/bin/file@' configure
configureFlags="$configureFlags --with-gdalconfig=${gdal}/bin/gdal-config --with-jsondir=${json_c.dev}"
'';
postConfigure = ''
sed -i "s|@mkdir -p \$(DESTDIR)\$(PGSQL_BINDIR)||g ;
s|\$(DESTDIR)\$(PGSQL_BINDIR)|$prefix/bin|g
" \
"raster/loader/Makefile";
sed -i "s|\$(DESTDIR)\$(PGSQL_BINDIR)|$prefix/bin|g
" \
"raster/scripts/python/Makefile";
'';
});
}