nixpkgs/pkgs/applications/gis/qgis/ltr.nix
Martin Joerg a5e11d787b qgis-ltr: wrap all binaries
This is necessary to make GRASS and Python plugins usable with qgis_process.
2024-09-04 09:21:15 +00:00

42 lines
936 B
Nix

{ makeWrapper
, nixosTests
, symlinkJoin
, extraPythonPackages ? (ps: [ ])
, libsForQt5
}:
let
qgis-ltr-unwrapped = libsForQt5.callPackage ./unwrapped-ltr.nix { };
in symlinkJoin rec {
inherit (qgis-ltr-unwrapped) version;
name = "qgis-${version}";
paths = [ qgis-ltr-unwrapped ];
nativeBuildInputs = [
makeWrapper
qgis-ltr-unwrapped.py.pkgs.wrapPython
];
# extend to add to the python environment of QGIS without rebuilding QGIS application.
pythonInputs = qgis-ltr-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-ltr-unwrapped.py.pkgs);
postBuild = ''
buildPythonPath "$pythonInputs"
for program in $out/bin/*; do
wrapProgram $program \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
done
'';
passthru = {
unwrapped = qgis-ltr-unwrapped;
tests.qgis-ltr = nixosTests.qgis-ltr;
};
inherit (qgis-ltr-unwrapped) meta;
}