qgis-ltr: 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-04 09:21:15 +00:00
parent ea8a9b515b
commit a5e11d787b
2 changed files with 10 additions and 8 deletions

View File

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

View File

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