2024-07-27 06:49:29 +00:00
|
|
|
{ makeWrapper
|
2023-10-09 19:29:22 +00:00
|
|
|
, 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 = ''
|
|
|
|
buildPythonPath "$pythonInputs"
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
for program in $out/bin/*; do
|
|
|
|
wrapProgram $program \
|
|
|
|
--prefix PATH : $program_PATH \
|
|
|
|
--set PYTHONPATH $program_PYTHONPATH
|
|
|
|
done
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
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;
|
|
|
|
}
|