From 8f6d6a274c41bf01e1ee55325c0b94ea21533a76 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 16 Mar 2025 21:00:42 +0100 Subject: [PATCH] postgresqlPackages.postgis: modernize --- pkgs/servers/sql/postgresql/ext/postgis.nix | 59 +++++++++++---------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/postgis.nix b/pkgs/servers/sql/postgresql/ext/postgis.nix index 556bfd030de7..9a4e46fc2680 100644 --- a/pkgs/servers/sql/postgresql/ext/postgis.nix +++ b/pkgs/servers/sql/postgresql/ext/postgis.nix @@ -1,33 +1,34 @@ { - fetchFromGitHub, - lib, - stdenv, - perl, - libxml2, - postgresql, - postgresqlTestHook, - geos, - proj, - gdalMinimal, - json_c, - pkg-config, - file, - protobufc, - libiconv, - libxslt, - docbook5, - cunit, - pcre2, - postgresqlTestExtension, - jitSupport, - llvm, - buildPostgresqlExtension, autoconf, automake, + buildPostgresqlExtension, + cunit, + docbook5, + fetchFromGitHub, + file, + gdalMinimal, + geos, + jitSupport, + json_c, + lib, + libiconv, libtool, + libxml2, + libxslt, + llvm, + pcre2, + perl, + pkg-config, + postgresql, + postgresqlTestExtension, + postgresqlTestHook, + proj, + protobufc, + stdenv, which, - sfcgal, + withSfcgal ? false, + sfcgal, }: let @@ -45,7 +46,7 @@ buildPostgresqlExtension (finalAttrs: { src = fetchFromGitHub { owner = "postgis"; repo = "postgis"; - rev = "${finalAttrs.version}"; + tag = "${finalAttrs.version}"; hash = "sha256-1kOLtG6AMavbWQ1lHG2ABuvIcyTYhgcbjuVmqMR4X+g="; }; @@ -60,6 +61,7 @@ buildPostgresqlExtension (finalAttrs: { ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv ++ lib.optional withSfcgal sfcgal; + nativeBuildInputs = [ autoconf automake @@ -70,6 +72,7 @@ buildPostgresqlExtension (finalAttrs: { protobufc which ] ++ lib.optional jitSupport llvm; + dontDisableStatic = true; nativeCheckInputs = [ @@ -158,12 +161,12 @@ buildPostgresqlExtension (finalAttrs: { ''; }; - meta = with lib; { + meta = { description = "Geographic Objects for PostgreSQL"; homepage = "https://postgis.net/"; changelog = "https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${finalAttrs.version}/NEWS"; - license = licenses.gpl2Plus; - maintainers = with maintainers; teams.geospatial.members ++ [ marcweber ]; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; lib.teams.geospatial.members ++ [ marcweber ]; inherit (postgresql.meta) platforms; }; })