From f201c1abead6960a0b0199c6569483a340be5f32 Mon Sep 17 00:00:00 2001 From: Kamil Monicz Date: Tue, 20 May 2025 02:57:09 +0200 Subject: [PATCH] Fix mapscript Python package install --- pkgs/by-name/ma/mapserver/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/ma/mapserver/package.nix b/pkgs/by-name/ma/mapserver/package.nix index a3bbd8239692..8e2dc6fc06e2 100644 --- a/pkgs/by-name/ma/mapserver/package.nix +++ b/pkgs/by-name/ma/mapserver/package.nix @@ -47,6 +47,7 @@ stdenv.mkDerivation rec { ++ lib.optionals withPython [ swig python3.pkgs.setuptools + python3.pkgs.pythonImportsCheckHook ]; buildInputs = [ @@ -82,6 +83,13 @@ stdenv.mkDerivation rec { (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/";