2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, nixosTests
|
|
|
|
, symlinkJoin
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
, extraPythonPackages ? (ps: [ ])
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
, libsForQt5
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
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 ];
|
|
|
|
|
2023-10-09 19:29:22 +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
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru = {
|
|
|
|
unwrapped = qgis-unwrapped;
|
|
|
|
tests.qgis = nixosTests.qgis;
|
|
|
|
};
|
2022-01-27 00:19:43 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = qgis-unwrapped.meta;
|
|
|
|
}
|