Skip to content

Commit

Permalink
qgis: wrap all binaries
Browse files Browse the repository at this point in the history
This is necessary to make GRASS and Python plugins usable with qgis_process.
  • Loading branch information
mjoerg committed Sep 3, 2024
1 parent 9155ee1 commit ea8a9b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions pkgs/applications/gis/qgis/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
8 changes: 5 additions & 3 deletions pkgs/applications/gis/qgis/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; {
Expand Down

0 comments on commit ea8a9b5

Please sign in to comment.