mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
ce4927f0d5
Grass is a runtime dependency which qgis attempts to find on the path. 3D is on by default with normal distributions so we should also enable it.
29 lines
777 B
Nix
29 lines
777 B
Nix
{ lib, makeWrapper, symlinkJoin
|
|
, qgis-unwrapped, grass, extraPythonPackages ? (ps: [ ])
|
|
}:
|
|
with lib;
|
|
symlinkJoin rec {
|
|
inherit (qgis-unwrapped) version;
|
|
name = "qgis-${version}";
|
|
|
|
paths = [ qgis-unwrapped ];
|
|
|
|
nativeBuildInputs = [ grass makeWrapper qgis-unwrapped.python3Packages.wrapPython ];
|
|
|
|
# extend to add to the python environment of QGIS without rebuilding QGIS application.
|
|
pythonInputs = qgis-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-unwrapped.python3Packages);
|
|
|
|
postBuild = ''
|
|
# unpackPhase
|
|
|
|
buildPythonPath "$pythonInputs"
|
|
|
|
wrapProgram $out/bin/qgis \
|
|
--prefix PATH : $program_PATH \
|
|
--prefix PATH : ${lib.makeBinPath [grass]} \
|
|
--set PYTHONPATH $program_PYTHONPATH
|
|
'';
|
|
|
|
meta = qgis-unwrapped.meta;
|
|
}
|