Merge pull request #30321 from RemiDesgrange/add-postgis-2.4.0
Add postgis 2.4.0
This commit is contained in:
commit
4ea954477f
@ -303,6 +303,7 @@ in rec {
|
||||
#tests.panamax = hydraJob (import tests/panamax.nix { system = "x86_64-linux"; });
|
||||
tests.peerflix = callTest tests/peerflix.nix {};
|
||||
tests.postgresql = callSubTests tests/postgresql.nix {};
|
||||
tests.postgis = callTest tests/postgis.nix {};
|
||||
#tests.pgjwt = callTest tests/pgjwt.nix {};
|
||||
tests.printing = callTest tests/printing.nix {};
|
||||
tests.proxy = callTest tests/proxy.nix {};
|
||||
|
@ -9,15 +9,11 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
services.postgresql = let mypg = pkgs.postgresql95; in {
|
||||
services.postgresql = let mypg = pkgs.postgresql100; in {
|
||||
enable = true;
|
||||
package = mypg;
|
||||
extraPlugins = [ (pkgs.postgis.override { postgresql = mypg; }).v_2_2_1 ];
|
||||
initialScript = pkgs.writeText "postgresql-init.sql"
|
||||
''
|
||||
CREATE ROLE postgres WITH superuser login createdb;
|
||||
'';
|
||||
};
|
||||
extraPlugins = [ (pkgs.postgis.override { postgresql = mypg; }).v_2_4_0 ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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";
|
||||
'';
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user