2023-08-26 16:58:05 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
2023-08-28 15:59:16 +00:00
|
|
|
, nixosTests
|
2023-08-26 16:58:05 +00:00
|
|
|
, symlinkJoin
|
|
|
|
|
2022-01-25 19:16:18 +00:00
|
|
|
, extraPythonPackages ? (ps: [ ])
|
2023-08-26 16:58:05 +00:00
|
|
|
|
2022-01-25 19:16:18 +00:00
|
|
|
, libsForQt5
|
2021-12-07 21:16:04 +00:00
|
|
|
}:
|
2022-01-25 19:16:18 +00:00
|
|
|
let
|
|
|
|
qgis-ltr-unwrapped = libsForQt5.callPackage ./unwrapped-ltr.nix { };
|
|
|
|
in symlinkJoin rec {
|
|
|
|
|
2021-12-07 21:16:04 +00:00
|
|
|
inherit (qgis-ltr-unwrapped) version;
|
|
|
|
name = "qgis-${version}";
|
|
|
|
|
|
|
|
paths = [ qgis-ltr-unwrapped ];
|
|
|
|
|
2023-08-26 16:58:05 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
qgis-ltr-unwrapped.py.pkgs.wrapPython
|
|
|
|
];
|
2021-12-07 21:16:04 +00:00
|
|
|
|
|
|
|
# extend to add to the python environment of QGIS without rebuilding QGIS application.
|
|
|
|
pythonInputs = qgis-ltr-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-ltr-unwrapped.py.pkgs);
|
|
|
|
|
|
|
|
postBuild = ''
|
2023-04-04 12:48:59 +00:00
|
|
|
# unpackPhase
|
2021-12-07 21:16:04 +00:00
|
|
|
|
|
|
|
buildPythonPath "$pythonInputs"
|
|
|
|
|
|
|
|
wrapProgram $out/bin/qgis \
|
|
|
|
--prefix PATH : $program_PATH \
|
|
|
|
--set PYTHONPATH $program_PYTHONPATH
|
|
|
|
'';
|
|
|
|
|
2023-08-28 15:59:16 +00:00
|
|
|
passthru = {
|
|
|
|
unwrapped = qgis-ltr-unwrapped;
|
|
|
|
tests.qgis-ltr = nixosTests.qgis-ltr;
|
|
|
|
};
|
2022-01-25 19:16:18 +00:00
|
|
|
|
2021-12-07 21:16:04 +00:00
|
|
|
inherit (qgis-ltr-unwrapped) meta;
|
|
|
|
}
|