1{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
2, apacheHttpd, apr, aprutil, curl, db, fcgi, gdal, geos
3, libgeotiff, libjpeg, libpng, libtiff, pcre, pixman, proj, sqlite, zlib
4}:
5
6stdenv.mkDerivation rec {
7 pname = "mapcache";
8 version = "1.10.0";
9
10 src = fetchFromGitHub {
11 owner = "MapServer";
12 repo = pname;
13 rev = "rel-${lib.replaceStrings [ "." ] [ "-" ] version}";
14 sha256 = "sha256-HrvcJAf0a6tu8AKKuW5TaCtqPMgzH21fGMBxIfUzdgY=";
15 };
16
17 nativeBuildInputs = [
18 cmake
19 pkg-config
20 ];
21
22 buildInputs = [
23 apacheHttpd
24 apr
25 aprutil
26 curl
27 db
28 fcgi
29 gdal
30 geos
31 libgeotiff
32 libjpeg
33 libpng
34 libtiff
35 pcre
36 pixman
37 proj
38 sqlite
39 zlib
40 ];
41
42 cmakeFlags = [
43 "-DWITH_BERKELEY_DB=ON"
44 "-DWITH_MEMCACHE=ON"
45 "-DWITH_TIFF=ON"
46 "-DWITH_GEOTIFF=ON"
47 "-DWITH_PCRE=ON"
48 "-DAPACHE_MODULE_DIR=${placeholder "out"}/modules"
49 ];
50
51 meta = with lib; {
52 description = "A server that implements tile caching to speed up access to WMS layers";
53 homepage = "https://mapserver.org/mapcache/";
54 changelog = "https://www.mapserver.org/development/changelog/mapcache/";
55 license = licenses.mit;
56 maintainers = with maintainers; [ sikmir ];
57 platforms = platforms.unix;
58 };
59}