2024-07-17 05:26:36 +02:00
|
|
|
{ makeWrapper
|
2023-08-28 17:59:16 +02:00
|
|
|
, nixosTests
|
2023-08-26 18:58:05 +02:00
|
|
|
, symlinkJoin
|
|
|
|
|
2022-01-25 20:16:18 +01:00
|
|
|
, extraPythonPackages ? (ps: [ ])
|
2023-08-26 18:58:05 +02:00
|
|
|
|
2022-01-25 20:16:18 +01:00
|
|
|
, libsForQt5
|
2021-12-07 22:16:04 +01:00
|
|
|
}:
|
2022-01-25 20:16:18 +01:00
|
|
|
let
|
|
|
|
qgis-ltr-unwrapped = libsForQt5.callPackage ./unwrapped-ltr.nix { };
|
|
|
|
in symlinkJoin rec {
|
|
|
|
|
2021-12-07 22:16:04 +01:00
|
|
|
inherit (qgis-ltr-unwrapped) version;
|
|
|
|
name = "qgis-${version}";
|
|
|
|
|
|
|
|
paths = [ qgis-ltr-unwrapped ];
|
|
|
|
|
2023-08-26 18:58:05 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
qgis-ltr-unwrapped.py.pkgs.wrapPython
|
|
|
|
];
|
2021-12-07 22:16:04 +01: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 = ''
|
|
|
|
buildPythonPath "$pythonInputs"
|
|
|
|
|
2024-09-04 11:21:15 +02:00
|
|
|
for program in $out/bin/*; do
|
|
|
|
wrapProgram $program \
|
|
|
|
--prefix PATH : $program_PATH \
|
|
|
|
--set PYTHONPATH $program_PYTHONPATH
|
|
|
|
done
|
2021-12-07 22:16:04 +01:00
|
|
|
'';
|
|
|
|
|
2023-08-28 17:59:16 +02:00
|
|
|
passthru = {
|
|
|
|
unwrapped = qgis-ltr-unwrapped;
|
|
|
|
tests.qgis-ltr = nixosTests.qgis-ltr;
|
|
|
|
};
|
2022-01-25 20:16:18 +01:00
|
|
|
|
2021-12-07 22:16:04 +01:00
|
|
|
inherit (qgis-ltr-unwrapped) meta;
|
|
|
|
}
|