about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/librasterlite2/default.nix
blob: de9fa02d44db1056d7bdd9b0e984c442667bf99a (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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 <time.h>' 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 ];
  };
}