Files
nixpkgs/pkgs/by-name/ma/mapserver/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

102 lines
1.9 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
withPython ? true,
cairo,
cmake,
curl,
fcgi,
freetype,
fribidi,
gdal,
geos,
giflib,
harfbuzz,
libjpeg,
libpng,
libpq,
librsvg,
libxml2,
pkg-config,
proj,
protobufc,
python3,
swig,
zlib,
}:
stdenv.mkDerivation rec {
pname = "mapserver";
version = "8.4.1";
src = fetchFromGitHub {
owner = "MapServer";
repo = "MapServer";
rev = "rel-${lib.replaceStrings [ "." ] [ "-" ] version}";
hash = "sha256-Q5PFOA/UGpDbzS0yROBOY6eXSgzx7nzSC+P109FrhvA=";
};
nativeBuildInputs = [
cmake
pkg-config
]
++ lib.optionals withPython [
swig
python3.pkgs.setuptools
python3.pkgs.pythonImportsCheckHook
];
buildInputs = [
cairo
curl
fcgi
freetype
fribidi
gdal
geos
giflib
harfbuzz
libjpeg
libpng
libpq
librsvg
libxml2
proj
protobufc
zlib
]
++ lib.optional withPython python3;
cmakeFlags = [
(lib.cmakeBool "WITH_KML" true)
(lib.cmakeBool "WITH_SOS" true)
(lib.cmakeBool "WITH_RSVG" true)
(lib.cmakeBool "WITH_CURL" true)
(lib.cmakeBool "WITH_CLIENT_WMS" true)
(lib.cmakeBool "WITH_CLIENT_WFS" true)
(lib.cmakeBool "WITH_PYTHON" withPython)
# RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
(lib.cmakeBool "CMAKE_SKIP_BUILD_RPATH" true)
];
postInstall = lib.optionalString withPython ''
mkdir -p $out/${python3.sitePackages}
cp -r src/mapscript/python/mapscript $out/${python3.sitePackages}
'';
pythonImportsCheck = [ "mapscript" ];
meta = {
description = "Platform for publishing spatial data and interactive mapping applications to the web";
homepage = "https://mapserver.org/";
changelog = "https://mapserver.org/development/changelog/";
license = lib.licenses.mit;
teams = [ lib.teams.geospatial ];
platforms = lib.platforms.unix;
};
}