51 py = python311.override {
53 packageOverrides = self: super: {
54 pyqt5 = super.pyqt5.override {
60 pythonBuildInputs = with py.pkgs; [
82 pname = "qgis-ltr-unwrapped";
84 src = fetchFromGitHub {
87 rev = "final-${lib.replaceStrings [ "." ] [ "_" ] version}";
88 hash = "sha256-VNgUMEA7VKZXsLG1ZYUIlYvjwRrH8LsliGiVRMnXOM0=";
92 inherit pythonBuildInputs;
137 ] ++ lib.optional withGrass grass
138 ++ lib.optional withWebKit qtwebkit
139 ++ pythonBuildInputs;
143 src = ./set-pyqt-package-dirs-ltr.patch;
144 pyQt5PackageDir = "${py.pkgs.pyqt5}/${py.pkgs.python.sitePackages}";
145 qsciPackageDir = "${py.pkgs.qscintilla-qt5}/${py.pkgs.python.sitePackages}";
149 # Add path to Qt platform plugins
150 # (offscreen is needed by "${APIS_SRC_DIR}/generate_console_pap.py")
151 env.QT_QPA_PLATFORM_PLUGIN_PATH="${qtbase}/${qtbase.qtPluginPrefix}/platforms";
156 "-DENABLE_TESTS=False"
157 ] ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF"
158 ++ lib.optional withGrass (let
159 gmajor = lib.versions.major grass.version;
160 gminor = lib.versions.minor grass.version;
161 in "-DGRASS_PREFIX${gmajor}=${grass}/grass${gmajor}${gminor}"
165 "--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase}/${qtbase.qtPluginPrefix}/platforms"
168 dontWrapGApps = true; # wrapper params passed below
170 postFixup = lib.optionalString withGrass ''
171 # GRASS has to be availble on the command line even though we baked in
172 # the path at build time using GRASS_PREFIX.
173 # Using wrapGAppsHook also prevents file dialogs from crashing the program
175 for program in $out/bin/*; do
176 wrapProgram $program \
177 "''${gappsWrapperArgs[@]}" \
178 --prefix PATH : ${lib.makeBinPath [ grass ]}
183 description = "Free and Open Source Geographic Information System";
184 homepage = "https://www.qgis.org";
185 license = licenses.gpl2Plus;
186 maintainers = with maintainers; teams.geospatial.members ++ [ lsix ];
187 platforms = with platforms; linux;