about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libspatialite/default.nix
blob: 592b7101a07497d0c73151843152ba0d36787e39 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ lib
, stdenv
, fetchurl
, pkg-config
, geos
, librttopo
, libxml2
, minizip
, proj
, sqlite
, libiconv
}:

stdenv.mkDerivation rec {
  pname = "libspatialite";
  version = "5.0.1";

  outputs = [ "out" "dev" ];

  src = fetchurl {
    url = "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/${pname}-${version}.tar.gz";
    sha256 = "sha256-7svJQxHHgBLQWevA+uhupe9u7LEzA+boKzdTwbNAnpg=";
  };

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    geos
    librttopo
    libxml2
    minizip
    proj
    sqlite
  ] ++ lib.optionals stdenv.isDarwin [
    libiconv
  ];

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

  enableParallelBuilding = true;

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

  meta = with lib; {
    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;
    maintainers = with maintainers; [ dotlambda ];
  };
}