3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/gis/qgis/default.nix

34 lines
806 B
Nix
Raw Normal View History

{ lib, makeWrapper, symlinkJoin
, extraPythonPackages ? (ps: [ ])
, libsForQt5
2015-10-27 07:26:07 +00:00
}:
2019-02-27 21:08:06 +00:00
with lib;
let
qgis-unwrapped = libsForQt5.callPackage ./unwrapped.nix { };
in symlinkJoin rec {
2019-02-27 21:08:06 +00:00
inherit (qgis-unwrapped) version;
name = "qgis-${version}";
2019-02-27 21:08:06 +00:00
paths = [ qgis-unwrapped ];
nativeBuildInputs = [ makeWrapper qgis-unwrapped.py.pkgs.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.py.pkgs);
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
'';
passthru.unwrapped = qgis-unwrapped;
2019-02-27 21:08:06 +00:00
meta = qgis-unwrapped.meta;
}