2020-04-24 23:36:52 +00:00
|
|
|
{ lib, makeWrapper, symlinkJoin
|
2022-01-27 00:19:43 +00:00
|
|
|
, extraPythonPackages ? (ps: [ ])
|
|
|
|
, libsForQt5
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
with lib;
|
2022-01-27 00:19:43 +00:00
|
|
|
let
|
|
|
|
qgis-unwrapped = libsForQt5.callPackage ./unwrapped.nix { };
|
|
|
|
in symlinkJoin rec {
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (qgis-unwrapped) version;
|
|
|
|
name = "qgis-${version}";
|
|
|
|
|
|
|
|
paths = [ qgis-unwrapped ];
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper qgis-unwrapped.py.pkgs.wrapPython ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# extend to add to the python environment of QGIS without rebuilding QGIS application.
|
2022-01-27 00:19:43 +00:00
|
|
|
pythonInputs = qgis-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-unwrapped.py.pkgs);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
# unpackPhase
|
|
|
|
|
|
|
|
buildPythonPath "$pythonInputs"
|
|
|
|
|
|
|
|
wrapProgram $out/bin/qgis \
|
|
|
|
--prefix PATH : $program_PATH \
|
|
|
|
--set PYTHONPATH $program_PYTHONPATH
|
|
|
|
'';
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
passthru.unwrapped = qgis-unwrapped;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = qgis-unwrapped.meta;
|
|
|
|
}
|