Skip to content

Commit

Permalink
postgresqlPackages.postgis: build minimal gdal version
Browse files Browse the repository at this point in the history
This change is reducing closure size from 1.5G to
544M.
  • Loading branch information
imincik committed Jan 3, 2024
1 parent 574ac1e commit afc2f0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions nixos/tests/postgis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
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;'")
'';
})
6 changes: 5 additions & 1 deletion pkgs/servers/sql/postgresql/ext/postgis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
, postgresql
, geos
, proj
, gdal
, gdalMinimal
, json_c
, pkg-config
, file
Expand All @@ -14,6 +14,10 @@
, pcre2
, nixosTests
}:

let
gdal = gdalMinimal;
in
stdenv.mkDerivation rec {
pname = "postgis";
version = "3.4.1";
Expand Down

0 comments on commit afc2f0f

Please sign in to comment.