53 py = python3.override {
55 packageOverrides = self: super: {
56 pyqt5 = super.pyqt5.override {
58 withSerialPort = true;
63 pythonBuildInputs = with py.pkgs; [
86 pname = "qgis-ltr-unwrapped";
88 src = fetchFromGitHub {
91 rev = "final-${lib.replaceStrings [ "." ] [ "_" ] version}";
92 hash = "sha256-eNncDIRfFYFxyc5a2tZijmVpx/LNm/roak84guFvldg=";
96 inherit pythonBuildInputs;
100 nativeBuildInputs = [
143 ++ lib.optional withGrass grass
144 ++ lib.optional withWebKit qtwebkit
145 ++ pythonBuildInputs;
149 src = ./set-pyqt-package-dirs-ltr.patch;
150 pyQt5PackageDir = "${py.pkgs.pyqt5}/${py.pkgs.python.sitePackages}";
151 qsciPackageDir = "${py.pkgs.qscintilla-qt5}/${py.pkgs.python.sitePackages}";
155 # Add path to Qt platform plugins
156 # (offscreen is needed by "${APIS_SRC_DIR}/generate_console_pap.py")
157 env.QT_QPA_PLATFORM_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}/platforms";
163 "-DENABLE_TESTS=False"
165 ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF"
166 ++ lib.optional withServer [
168 "-DQGIS_CGIBIN_SUBDIR=${placeholder "out"}/lib/cgi-bin"
170 ++ lib.optional withGrass (
172 gmajor = lib.versions.major grass.version;
173 gminor = lib.versions.minor grass.version;
175 "-DGRASS_PREFIX${gmajor}=${grass}/grass${gmajor}${gminor}"
179 "--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase}/${qtbase.qtPluginPrefix}/platforms"
182 dontWrapGApps = true; # wrapper params passed below
184 postFixup = lib.optionalString withGrass ''
185 # GRASS has to be availble on the command line even though we baked in
186 # the path at build time using GRASS_PREFIX.
187 # Using wrapGAppsHook also prevents file dialogs from crashing the program
189 for program in $out/bin/*; do
190 wrapProgram $program \
191 "''${gappsWrapperArgs[@]}" \
192 --prefix PATH : ${lib.makeBinPath [ grass ]}
197 description = "Free and Open Source Geographic Information System";
198 homepage = "https://www.qgis.org";
199 license = licenses.gpl2Plus;
200 maintainers = with maintainers; teams.geospatial.members ++ [ lsix ];
201 platforms = with platforms; linux;