diff --git a/pkgs/applications/gis/spatialite-gui/default.nix b/pkgs/applications/gis/spatialite-gui/default.nix new file mode 100644 index 000000000000..541d0da8d734 --- /dev/null +++ b/pkgs/applications/gis/spatialite-gui/default.nix @@ -0,0 +1,77 @@ +{ lib +, stdenv +, fetchurl +, pkg-config +, desktopToDarwinBundle +, curl +, freexl +, geos +, librasterlite2 +, librttopo +, libspatialite +, libwebp +, libxlsxwriter +, libxml2 +, lz4 +, minizip +, openjpeg +, postgresql +, proj +, sqlite +, virtualpg +, wxGTK +, wxmac +, zstd +, Carbon +, Cocoa +, IOKit +}: + +stdenv.mkDerivation rec { + pname = "spatialite-gui"; + version = "2.1.0-beta1"; + + src = fetchurl { + url = "https://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/spatialite_gui-${version}.tar.gz"; + hash = "sha256-ukjZbfGM68P/I/aXlyB64VgszmL0WWtpuuMAyjwj2zM="; + }; + + nativeBuildInputs = [ pkg-config ] + ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + + buildInputs = [ + curl + freexl + geos + librasterlite2 + librttopo + libspatialite + libwebp + libxlsxwriter + libxml2 + lz4 + minizip + openjpeg + postgresql + proj + sqlite + virtualpg + zstd + ] ++ lib.optional stdenv.isLinux wxGTK + ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa IOKit wxmac ]; + + enableParallelBuilding = true; + + postFixup = lib.optionalString stdenv.isDarwin '' + rm -fr $out/share + ''; + + meta = with lib; { + description = "Graphical user interface for SpatiaLite"; + homepage = "https://www.gaia-gis.it/fossil/spatialite_gui"; + license = licenses.gpl3Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ sikmir ]; + mainProgram = "spatialite_gui"; + }; +} diff --git a/pkgs/development/libraries/librasterlite2/default.nix b/pkgs/development/libraries/librasterlite2/default.nix new file mode 100644 index 000000000000..de9fa02d44db --- /dev/null +++ b/pkgs/development/libraries/librasterlite2/default.nix @@ -0,0 +1,90 @@ +{ lib +, stdenv +, fetchurl +, pkg-config +, validatePkgConfig +, cairo +, curl +, fontconfig +, freetype +, freexl +, geos +, giflib +, libgeotiff +, libjpeg +, libpng +, librttopo +, libspatialite +, libtiff +, libwebp +, libxml2 +, lz4 +, minizip +, openjpeg +, pixman +, proj +, sqlite +, zstd +, ApplicationServices +}: + +stdenv.mkDerivation rec { + pname = "librasterlite2"; + version = "1.1.0-beta1"; + + src = fetchurl { + url = "https://www.gaia-gis.it/gaia-sins/librasterlite2-sources/librasterlite2-${version}.tar.gz"; + hash = "sha256-9yhM38B600OjFOSHjfAwCHSwFF2dMxsGOwlrSC5+RPQ="; + }; + + # Fix error: unknown type name 'time_t' + postPatch = '' + sed -i '49i #include ' headers/rasterlite2_private.h + ''; + + nativeBuildInputs = [ + pkg-config + validatePkgConfig + geos # for geos-config + ]; + + buildInputs = [ + cairo + curl + fontconfig + freetype + freexl + giflib + geos + libgeotiff + libjpeg + libpng + librttopo + libspatialite + libtiff + libwebp + libxml2 + lz4 + minizip + openjpeg + pixman + proj + sqlite + zstd + ] ++ lib.optional stdenv.isDarwin ApplicationServices; + + enableParallelBuilding = true; + + # Failed tests: + # - check_sql_stmt + doCheck = false; + + meta = with lib; { + description = "Advanced library supporting raster handling methods"; + homepage = "https://www.gaia-gis.it/fossil/librasterlite2"; + # They allow any of these + license = with licenses; [ gpl2Plus lgpl21Plus mpl11 ]; + platforms = platforms.unix; + maintainers = with maintainers; [ sikmir ]; + }; +} diff --git a/pkgs/development/libraries/virtualpg/default.nix b/pkgs/development/libraries/virtualpg/default.nix new file mode 100644 index 000000000000..277ca47d66e3 --- /dev/null +++ b/pkgs/development/libraries/virtualpg/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchurl, validatePkgConfig, postgresql, sqlite }: + +stdenv.mkDerivation rec { + pname = "virtualpg"; + version = "2.0.1"; + + src = fetchurl { + url = "https://www.gaia-gis.it/gaia-sins/virtualpg-${version}.tar.gz"; + hash = "sha256-virr64yf8nQ4IIX1HUIugjhYvKT2vC+pCYFkZMah4Is="; + }; + + nativeBuildInputs = [ + validatePkgConfig + postgresql # for pg_config + ]; + + buildInputs = [ postgresql sqlite ]; + + meta = with lib; { + description = "Loadable dynamic extension to both SQLite and SpatiaLite"; + homepage = "https://www.gaia-gis.it/fossil/virtualpg"; + license = with licenses; [ mpl11 gpl2Plus lgpl21Plus ]; + platforms = platforms.unix; + maintainers = with maintainers; [ sikmir ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85cafda6b282..4a4f2478ba9a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22247,6 +22247,8 @@ with pkgs; vlock = callPackage ../misc/screensavers/vlock { }; + virtualpg = callPackage ../development/libraries/virtualpg { }; + vmime = callPackage ../development/libraries/vmime { }; vrb = callPackage ../development/libraries/vrb { }; @@ -24692,6 +24694,10 @@ with pkgs; python = python3; }; + librasterlite2 = callPackage ../development/libraries/librasterlite2 { + inherit (darwin.apple_sdk.frameworks) ApplicationServices; + }; + libraw = callPackage ../development/libraries/libraw { }; libraw_unstable = callPackage ../development/libraries/libraw/unstable.nix { }; @@ -26545,6 +26551,11 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Cocoa; }; + spatialite_gui = callPackage ../applications/gis/spatialite-gui { + inherit (darwin.apple_sdk.frameworks) Carbon Cocoa IOKit; + wxGTK = wxGTK30-gtk3; + }; + spatialite_tools = callPackage ../applications/gis/spatialite-tools { }; udig = callPackage ../applications/gis/udig { };