nixpkgs/pkgs/servers/geospatial/mapserver/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.5 KiB
Nix
Raw Normal View History

2021-09-14 20:04:18 +00:00
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
, cairo, curl, fcgi, freetype, fribidi, gdal, geos, giflib, harfbuzz
, libjpeg, libpng, librsvg, libxml2, postgresql, proj, protobufc, zlib
2022-04-23 18:54:58 +00:00
, withPython ? true, swig, python3
2021-09-14 20:04:18 +00:00
}:
stdenv.mkDerivation rec {
pname = "mapserver";
2024-08-02 10:02:57 +00:00
version = "8.2.1";
2021-09-14 20:04:18 +00:00
src = fetchFromGitHub {
owner = "MapServer";
repo = "MapServer";
rev = "rel-${lib.replaceStrings [ "." ] [ "-" ] version}";
2024-08-02 10:02:57 +00:00
sha256 = "sha256-kZEDC89yoQP0ma5avp6r+Hz8JMpErGlBVQkhlHO6UFw=";
2021-09-14 20:04:18 +00:00
};
nativeBuildInputs = [
cmake
pkg-config
] ++ lib.optionals withPython [ swig python3.pkgs.setuptools ];
2021-09-14 20:04:18 +00:00
buildInputs = [
cairo
curl
fcgi
freetype
fribidi
gdal
geos
giflib
harfbuzz
libjpeg
libpng
librsvg
2024-08-02 10:02:57 +00:00
(libxml2.override { enableHttp = true; })
2021-09-14 20:04:18 +00:00
postgresql
proj
protobufc
zlib
2022-04-23 18:54:58 +00:00
] ++ lib.optional withPython python3;
2021-09-14 20:04:18 +00:00
cmakeFlags = [
"-DWITH_KML=ON"
"-DWITH_SOS=ON"
"-DWITH_RSVG=ON"
"-DWITH_CURL=ON"
"-DWITH_CLIENT_WMS=ON"
"-DWITH_CLIENT_WFS=ON"
# RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
"-DCMAKE_SKIP_BUILD_RPATH=ON"
2021-09-14 20:04:18 +00:00
] ++ lib.optional withPython "-DWITH_PYTHON=ON";
meta = with lib; {
description = "Platform for publishing spatial data and interactive mapping applications to the web";
homepage = "https://mapserver.org/";
changelog = "https://mapserver.org/development/changelog/";
license = licenses.mit;
maintainers = teams.geospatial.members;
2021-09-14 20:04:18 +00:00
platforms = platforms.unix;
};
}