1{ stdenv, lib, fetchurl, pkgconfig, libxml2, sqlite, zlib, proj, geos, libiconv }:
2
3with lib;
4
5stdenv.mkDerivation rec {
6 name = "libspatialite-4.2.0";
7
8 src = fetchurl {
9 url = "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/${name}.tar.gz";
10 sha256 = "0b9ipmp09y2ij7yajyjsh0zcwps8n5g88lzfzlkph33lail8l4wz";
11 };
12
13 nativeBuildInputs = [ pkgconfig ];
14 buildInputs = [ libxml2 sqlite zlib proj geos libiconv ];
15
16 configureFlags = "--disable-freexl";
17
18 enableParallelBuilding = true;
19
20 postInstall = "" + optionalString stdenv.isDarwin ''
21 ln -s $out/lib/mod_spatialite.{so,dylib}
22 '';
23
24 meta = {
25 description = "Extensible spatial index library in C++";
26 homepage = https://www.gaia-gis.it/fossil/libspatialite;
27 # They allow any of these
28 license = with licenses; [ gpl2Plus lgpl21Plus mpl11 ];
29 platforms = platforms.unix;
30 };
31}