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

28 lines
721 B
Nix
Raw Normal View History

2019-02-27 22:08:06 +01:00
{ stdenv, lib, makeWrapper, symlinkJoin
, qgis-unwrapped, extraPythonPackages ? (ps: [ ])
2015-10-27 08:26:07 +01:00
}:
2019-02-27 22:08:06 +01:00
with lib;
symlinkJoin rec {
inherit (qgis-unwrapped) version;
name = "qgis-${version}";
2019-02-27 22:08:06 +01:00
paths = [ qgis-unwrapped ];
2019-02-27 22:08:06 +01:00
nativeBuildInputs = [ makeWrapper qgis-unwrapped.python3Packages.wrapPython ];
2019-02-27 22:08:06 +01: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 22:08:06 +01:00
postBuild = ''
# unpackPhase
2019-02-27 22:08:06 +01:00
buildPythonPath "$pythonInputs"
2019-02-27 22:08:06 +01:00
wrapProgram $out/bin/qgis \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
'';
2019-02-27 22:08:06 +01:00
meta = qgis-unwrapped.meta;
}