qgis: wrap all binaries

This is necessary to make GRASS and Python plugins usable with qgis_process.
This commit is contained in:
Martin Joerg 2024-09-03 20:08:05 +00:00
parent 9155ee1f34
commit ea8a9b515b
2 changed files with 10 additions and 8 deletions

View File

@ -24,13 +24,13 @@ in symlinkJoin rec {
pythonInputs = qgis-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-unwrapped.py.pkgs);
postBuild = ''
# unpackPhase
buildPythonPath "$pythonInputs"
wrapProgram $out/bin/qgis \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
for program in $out/bin/*; do
wrapProgram $program \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
done
'';
passthru = {

View File

@ -175,9 +175,11 @@ in mkDerivation rec {
# the path at build time using GRASS_PREFIX.
# Using wrapGAppsHook also prevents file dialogs from crashing the program
# on non-NixOS.
wrapProgram $out/bin/qgis \
"''${gappsWrapperArgs[@]}" \
--prefix PATH : ${lib.makeBinPath [ grass ]}
for program in $out/bin/*; do
wrapProgram $program \
"''${gappsWrapperArgs[@]}" \
--prefix PATH : ${lib.makeBinPath [ grass ]}
done
'';
meta = with lib; {