nixpkgs/pkgs/applications/gis/qgis/default.nix

28 lines
713 B
Nix
Raw Normal View History

{ lib, makeWrapper, symlinkJoin
2019-02-27 21:08:06 +00:00
, qgis-unwrapped, extraPythonPackages ? (ps: [ ])
2015-10-27 07:26:07 +00:00
}:
2019-02-27 21:08:06 +00:00
with lib;
symlinkJoin rec {
inherit (qgis-unwrapped) version;
name = "qgis-${version}";
2019-02-27 21:08:06 +00:00
paths = [ qgis-unwrapped ];
2019-02-27 21:08:06 +00:00
nativeBuildInputs = [ makeWrapper qgis-unwrapped.python3Packages.wrapPython ];
2019-02-27 21:08:06 +00:00
# extend to add to the python environment of QGIS without rebuilding QGIS application.
pythonInputs = qgis-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-unwrapped.python3Packages);
2019-02-27 21:08:06 +00:00
postBuild = ''
# unpackPhase
2019-02-27 21:08:06 +00:00
buildPythonPath "$pythonInputs"
2019-02-27 21:08:06 +00:00
wrapProgram $out/bin/qgis \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
'';
2019-02-27 21:08:06 +00:00
meta = qgis-unwrapped.meta;
}