summary refs log tree commit diff
path: root/pkgs/development/libraries/libspatialite/default.nix
blob: 7bd22248d8769b5aa85388f421d8c08a5705554e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, lib, fetchurl, pkgconfig, libxml2, sqlite, zlib, proj, geos, libiconv }:

with lib;

stdenv.mkDerivation rec {
  name = "libspatialite-4.3.0a";

  src = fetchurl {
    url = "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/${name}.tar.gz";
    sha256 = "16d4lpl7xrm9zy4gphy6nwanpjp8wn9g4wq2i2kh8abnlhq01448";
  };

  nativeBuildInputs = [ pkgconfig ];

  buildInputs = [ libxml2 sqlite zlib proj geos libiconv ];

  configureFlags = [ "--disable-freexl" ];

  enableParallelBuilding = true;

  CFLAGS = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1";

  postInstall = "" + optionalString stdenv.isDarwin ''
    ln -s $out/lib/mod_spatialite.{so,dylib}
  '';

  meta = {
    description = "Extensible spatial index library in C++";
    homepage = https://www.gaia-gis.it/fossil/libspatialite;
    # They allow any of these
    license = with licenses; [ gpl2Plus lgpl21Plus mpl11 ];
    platforms = platforms.unix;
  };
}