blob: 532ad7efc7d3014a6302e75e32c9ba28ae2fafaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{
lib,
stdenv,
makeWrapper,
nixosTests,
symlinkJoin,
extraPythonPackages ? (ps: [ ]),
libsForQt5,
# unwrapped package parameters
withGrass ? false,
withServer ? false,
}:
let
qgis-ltr-unwrapped = libsForQt5.callPackage ./unwrapped-ltr.nix {
inherit withGrass withServer;
};
in
symlinkJoin {
inherit (qgis-ltr-unwrapped) version outputs;
pname = "qgis-ltr";
paths = [ qgis-ltr-unwrapped ];
nativeBuildInputs = [
makeWrapper
qgis-ltr-unwrapped.py.pkgs.wrapPython
];
# 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"
for program in $out/bin/*; do
wrapProgram $program \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
done
''
+ lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
ln -s ${qgis-ltr-unwrapped.man} $man
'';
passthru = {
unwrapped = qgis-ltr-unwrapped;
tests.qgis-ltr = nixosTests.qgis-ltr;
updateScript = [
./update.sh
"qgis-ltr"
];
};
inherit (qgis-ltr-unwrapped) meta;
}
|