mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
ea8a9b515b
This is necessary to make GRASS and Python plugins usable with qgis_process.
42 lines
889 B
Nix
42 lines
889 B
Nix
{ makeWrapper
|
|
, nixosTests
|
|
, symlinkJoin
|
|
|
|
, extraPythonPackages ? (ps: [ ])
|
|
|
|
, libsForQt5
|
|
}:
|
|
let
|
|
qgis-unwrapped = libsForQt5.callPackage ./unwrapped.nix { };
|
|
in symlinkJoin rec {
|
|
|
|
inherit (qgis-unwrapped) version;
|
|
name = "qgis-${version}";
|
|
|
|
paths = [ qgis-unwrapped ];
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
qgis-unwrapped.py.pkgs.wrapPython
|
|
];
|
|
|
|
# extend to add to the python environment of QGIS without rebuilding QGIS application.
|
|
pythonInputs = qgis-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-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-unwrapped;
|
|
tests.qgis = nixosTests.qgis;
|
|
};
|
|
|
|
meta = qgis-unwrapped.meta;
|
|
}
|