Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / geospatial / mapserver / default.nix
blob922f0864b84142aa9eda891255d8a5419d768a5d
1 { lib, stdenv, fetchFromGitHub, cmake, pkg-config
2 , cairo, curl, fcgi, freetype, fribidi, gdal, geos, giflib, harfbuzz
3 , libjpeg, libpng, librsvg, libxml2, postgresql, proj, protobufc, zlib
4 , withPython ? true, swig, python3
5 }:
7 stdenv.mkDerivation rec {
8   pname = "mapserver";
9   version = "8.0.1";
11   src = fetchFromGitHub {
12     owner = "MapServer";
13     repo = "MapServer";
14     rev = "rel-${lib.replaceStrings [ "." ] [ "-" ] version}";
15     sha256 = "sha256-fAf4kOe/6bQW0i46+EZbD/6iWI2Bjkn2no6XeR/+mg4=";
16   };
18   patches = [
19     # drop this patch for version 8.0.2
20     ./fix-build-w-libxml2-12.patch
21   ];
23   nativeBuildInputs = [
24     cmake
25     pkg-config
26   ] ++ lib.optionals withPython [ swig python3.pkgs.setuptools ];
28   buildInputs = [
29     cairo
30     curl
31     fcgi
32     freetype
33     fribidi
34     gdal
35     geos
36     giflib
37     harfbuzz
38     libjpeg
39     libpng
40     librsvg
41     libxml2
42     postgresql
43     proj
44     protobufc
45     zlib
46   ] ++ lib.optional withPython python3;
48   cmakeFlags = [
49     "-DWITH_KML=ON"
50     "-DWITH_SOS=ON"
51     "-DWITH_RSVG=ON"
52     "-DWITH_CURL=ON"
53     "-DWITH_CLIENT_WMS=ON"
54     "-DWITH_CLIENT_WFS=ON"
56     # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
57     "-DCMAKE_SKIP_BUILD_RPATH=ON"
58   ] ++ lib.optional withPython "-DWITH_PYTHON=ON";
60   meta = with lib; {
61     description = "Platform for publishing spatial data and interactive mapping applications to the web";
62     homepage = "https://mapserver.org/";
63     changelog = "https://mapserver.org/development/changelog/";
64     license = licenses.mit;
65     maintainers = teams.geospatial.members;
66     platforms = platforms.unix;
67   };