mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
Merge pull request #250717 from imincik/qgis-3.32.2
qgis: 3.28.3 -> 3.32.2
This commit is contained in:
commit
0f5179b591
59
pkgs/applications/gis/qgis/set-pyqt-package-dirs-ltr.patch
Normal file
59
pkgs/applications/gis/qgis/set-pyqt-package-dirs-ltr.patch
Normal file
@ -0,0 +1,59 @@
|
||||
diff --git a/cmake/FindPyQt5.cmake b/cmake/FindPyQt5.cmake
|
||||
index b51fd0075e..87ee317e05 100644
|
||||
--- a/cmake/FindPyQt5.cmake
|
||||
+++ b/cmake/FindPyQt5.cmake
|
||||
@@ -25,7 +25,7 @@ ELSE(EXISTS PYQT5_VERSION_STR)
|
||||
IF(SIP_BUILD_EXECUTABLE)
|
||||
# SIP >= 5.0 path
|
||||
|
||||
- FILE(GLOB _pyqt5_metadata "${Python_SITEARCH}/PyQt5-*.dist-info/METADATA")
|
||||
+ FILE(GLOB _pyqt5_metadata "@pyQt5PackageDir@/PyQt5-*.dist-info/METADATA")
|
||||
IF(_pyqt5_metadata)
|
||||
FILE(READ ${_pyqt5_metadata} _pyqt5_metadata_contents)
|
||||
STRING(REGEX REPLACE ".*\nVersion: ([^\n]+).*$" "\\1" PYQT5_VERSION_STR ${_pyqt5_metadata_contents})
|
||||
@@ -34,8 +34,8 @@ ELSE(EXISTS PYQT5_VERSION_STR)
|
||||
ENDIF(_pyqt5_metadata)
|
||||
|
||||
IF(PYQT5_VERSION_STR)
|
||||
- SET(PYQT5_MOD_DIR "${Python_SITEARCH}/PyQt5")
|
||||
- SET(PYQT5_SIP_DIR "${Python_SITEARCH}/PyQt5/bindings")
|
||||
+ SET(PYQT5_MOD_DIR "@pyQt5PackageDir@/PyQt5")
|
||||
+ SET(PYQT5_SIP_DIR "@pyQt5PackageDir@/PyQt5/bindings")
|
||||
FIND_PROGRAM(__pyuic5 "pyuic5")
|
||||
GET_FILENAME_COMPONENT(PYQT5_BIN_DIR ${__pyuic5} DIRECTORY)
|
||||
|
||||
diff --git a/cmake/FindQsci.cmake b/cmake/FindQsci.cmake
|
||||
index 69e41c1fe9..5456c3d59b 100644
|
||||
--- a/cmake/FindQsci.cmake
|
||||
+++ b/cmake/FindQsci.cmake
|
||||
@@ -24,7 +24,7 @@ ELSE(QSCI_MOD_VERSION_STR)
|
||||
IF(SIP_BUILD_EXECUTABLE)
|
||||
# SIP >= 5.0 path
|
||||
|
||||
- FILE(GLOB _qsci_metadata "${Python_SITEARCH}/QScintilla*.dist-info/METADATA")
|
||||
+ FILE(GLOB _qsci_metadata "@qsciPackageDir@/QScintilla*.dist-info/METADATA")
|
||||
IF(_qsci_metadata)
|
||||
FILE(READ ${_qsci_metadata} _qsci_metadata_contents)
|
||||
STRING(REGEX REPLACE ".*\nVersion: ([^\n]+).*$" "\\1" QSCI_MOD_VERSION_STR ${_qsci_metadata_contents})
|
||||
@@ -33,7 +33,7 @@ ELSE(QSCI_MOD_VERSION_STR)
|
||||
ENDIF(_qsci_metadata)
|
||||
|
||||
IF(QSCI_MOD_VERSION_STR)
|
||||
- SET(QSCI_SIP_DIR "${PYQT5_SIP_DIR}")
|
||||
+ SET(QSCI_SIP_DIR "@qsciPackageDir@/PyQt5/bindings")
|
||||
SET(QSCI_FOUND TRUE)
|
||||
ENDIF(QSCI_MOD_VERSION_STR)
|
||||
|
||||
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
|
||||
index 4cd19c3af4..668cc6a5e6 100644
|
||||
--- a/python/CMakeLists.txt
|
||||
+++ b/python/CMakeLists.txt
|
||||
@@ -206,7 +206,7 @@ if (WITH_GUI)
|
||||
install(FILES ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_gui.pyi DESTINATION ${QGIS_PYTHON_DIR})
|
||||
endif()
|
||||
if(QSCI_SIP_DIR)
|
||||
- set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -I ${QSCI_SIP_DIR})
|
||||
+ set(SIP_BUILD_EXTRA_OPTIONS ${SIP_BUILD_EXTRA_OPTIONS} --include-dir=${QSCI_SIP_DIR})
|
||||
else()
|
||||
message(STATUS "Qsci sip file not found - disabling bindings for derived classes")
|
||||
set(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} HAVE_QSCI_SIP)
|
@ -39,7 +39,7 @@ index 69e41c1fe9..5456c3d59b 100644
|
||||
ENDIF(_qsci_metadata)
|
||||
|
||||
IF(QSCI_MOD_VERSION_STR)
|
||||
- SET(QSCI_SIP_DIR "${PYQT5_SIP_DIR}")
|
||||
- SET(QSCI_SIP_DIR "${PYQT_SIP_DIR}")
|
||||
+ SET(QSCI_SIP_DIR "@qsciPackageDir@/PyQt5/bindings")
|
||||
SET(QSCI_FOUND TRUE)
|
||||
ENDIF(QSCI_MOD_VERSION_STR)
|
||||
@ -48,7 +48,7 @@ diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
|
||||
index 4cd19c3af4..668cc6a5e6 100644
|
||||
--- a/python/CMakeLists.txt
|
||||
+++ b/python/CMakeLists.txt
|
||||
@@ -206,7 +206,7 @@ if (WITH_GUI)
|
||||
@@ -212,7 +212,7 @@ if (WITH_GUI)
|
||||
install(FILES ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_gui.pyi DESTINATION ${QGIS_PYTHON_DIR})
|
||||
endif()
|
||||
if(QSCI_SIP_DIR)
|
||||
|
@ -124,7 +124,7 @@ in mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./set-pyqt-package-dirs.patch;
|
||||
src = ./set-pyqt-package-dirs-ltr.patch;
|
||||
pyQt5PackageDir = "${py.pkgs.pyqt5}/${py.pkgs.python.sitePackages}";
|
||||
qsciPackageDir = "${py.pkgs.qscintilla-qt5}/${py.pkgs.python.sitePackages}";
|
||||
})
|
||||
|
@ -1,49 +1,52 @@
|
||||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, ninja
|
||||
, flex
|
||||
, makeWrapper
|
||||
, mkDerivation
|
||||
, substituteAll
|
||||
, wrapGAppsHook
|
||||
, wrapQtAppsHook
|
||||
|
||||
, withGrass ? true
|
||||
, withWebKit ? false
|
||||
|
||||
, bison
|
||||
, proj
|
||||
, geos
|
||||
, sqlite
|
||||
, gsl
|
||||
, qwt
|
||||
, cmake
|
||||
, exiv2
|
||||
, fcgi
|
||||
, python3
|
||||
, flex
|
||||
, geos
|
||||
, grass
|
||||
, gsl
|
||||
, hdf5
|
||||
, libspatialindex
|
||||
, libspatialite
|
||||
, postgresql
|
||||
, txt2tags
|
||||
, openssl
|
||||
, libzip
|
||||
, hdf5
|
||||
, netcdf
|
||||
, exiv2
|
||||
, protobuf
|
||||
, qtbase
|
||||
, qtsensors
|
||||
, qca-qt5
|
||||
, qtkeychain
|
||||
, qt3d
|
||||
, qscintilla
|
||||
, qtlocation
|
||||
, qtserialport
|
||||
, qtxmlpatterns
|
||||
, withGrass ? true
|
||||
, grass
|
||||
, withWebKit ? false
|
||||
, qtwebkit
|
||||
, ninja
|
||||
, openssl
|
||||
, pdal
|
||||
, postgresql
|
||||
, proj
|
||||
, protobuf
|
||||
, python3
|
||||
, qca-qt5
|
||||
, qscintilla
|
||||
, qt3d
|
||||
, qtbase
|
||||
, qtkeychain
|
||||
, qtlocation
|
||||
, qtmultimedia
|
||||
, qtsensors
|
||||
, qtserialport
|
||||
, qtwebkit
|
||||
, qtxmlpatterns
|
||||
, qwt
|
||||
, sqlite
|
||||
, txt2tags
|
||||
, zstd
|
||||
, makeWrapper
|
||||
, wrapGAppsHook
|
||||
, substituteAll
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
py = python3.override {
|
||||
packageOverrides = self: super: {
|
||||
pyqt5 = super.pyqt5.override {
|
||||
@ -53,34 +56,34 @@ let
|
||||
};
|
||||
|
||||
pythonBuildInputs = with py.pkgs; [
|
||||
qscintilla-qt5
|
||||
chardet
|
||||
gdal
|
||||
jinja2
|
||||
numpy
|
||||
psycopg2
|
||||
chardet
|
||||
python-dateutil
|
||||
pyyaml
|
||||
pytz
|
||||
requests
|
||||
urllib3
|
||||
pygments
|
||||
pyqt5
|
||||
pyqt-builder
|
||||
sip
|
||||
setuptools
|
||||
owslib
|
||||
psycopg2
|
||||
pygments
|
||||
pyqt-builder
|
||||
pyqt5
|
||||
python-dateutil
|
||||
pytz
|
||||
pyyaml
|
||||
qscintilla-qt5
|
||||
requests
|
||||
setuptools
|
||||
sip
|
||||
six
|
||||
urllib3
|
||||
];
|
||||
in mkDerivation rec {
|
||||
version = "3.28.3";
|
||||
version = "3.32.2";
|
||||
pname = "qgis-unwrapped";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "qgis";
|
||||
repo = "QGIS";
|
||||
rev = "final-${lib.replaceStrings [ "." ] [ "_" ] version}";
|
||||
hash = "sha256-nXauZSC78BX1fcx0SXniwQpRmdSLfoqZ5jlbXeHgRGI=";
|
||||
hash = "sha256-4Hcppzgst6v7SR/06ZICSujC4Gfckd/X5Mj40fh9OOU=";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
@ -88,40 +91,50 @@ in mkDerivation rec {
|
||||
inherit py;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
wrapGAppsHook
|
||||
wrapQtAppsHook
|
||||
|
||||
cmake
|
||||
flex
|
||||
bison
|
||||
ninja
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
proj
|
||||
geos
|
||||
sqlite
|
||||
gsl
|
||||
qwt
|
||||
exiv2
|
||||
protobuf
|
||||
fcgi
|
||||
geos
|
||||
gsl
|
||||
hdf5
|
||||
libspatialindex
|
||||
libspatialite
|
||||
postgresql
|
||||
txt2tags
|
||||
libzip
|
||||
hdf5
|
||||
netcdf
|
||||
qtbase
|
||||
qtsensors
|
||||
openssl
|
||||
pdal
|
||||
postgresql
|
||||
proj
|
||||
protobuf
|
||||
qca-qt5
|
||||
qtkeychain
|
||||
qscintilla
|
||||
qt3d
|
||||
qtbase
|
||||
qtkeychain
|
||||
qtlocation
|
||||
qtmultimedia
|
||||
qtsensors
|
||||
qtserialport
|
||||
qtxmlpatterns
|
||||
qt3d
|
||||
pdal
|
||||
qwt
|
||||
sqlite
|
||||
txt2tags
|
||||
zstd
|
||||
] ++ lib.optional withGrass grass
|
||||
++ lib.optional withWebKit qtwebkit
|
||||
++ pythonBuildInputs;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper wrapGAppsHook cmake flex bison ninja ];
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./set-pyqt-package-dirs.patch;
|
||||
@ -130,6 +143,12 @@ in mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
# Add path to Qt platform plugins
|
||||
# (offscreen is needed by "${APIS_SRC_DIR}/generate_console_pap.py")
|
||||
preBuild = ''
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH=${qtbase.bin}/lib/qt-${qtbase.version}/plugins/platforms
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DWITH_3D=True"
|
||||
"-DWITH_PDAL=TRUE"
|
||||
@ -140,13 +159,17 @@ in mkDerivation rec {
|
||||
in "-DGRASS_PREFIX${gmajor}=${grass}/grass${gmajor}${gminor}"
|
||||
);
|
||||
|
||||
qtWrapperArgs = [
|
||||
"--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-${qtbase.version}/plugins/platforms"
|
||||
];
|
||||
|
||||
dontWrapGApps = true; # wrapper params passed below
|
||||
|
||||
postFixup = lib.optionalString withGrass ''
|
||||
# grass has to be availble on the command line even though we baked in
|
||||
# GRASS has to be availble on the command line even though we baked in
|
||||
# the path at build time using GRASS_PREFIX.
|
||||
# using wrapGAppsHook also prevents file dialogs from crashing the program
|
||||
# on non-NixOS
|
||||
# Using wrapGAppsHook also prevents file dialogs from crashing the program
|
||||
# on non-NixOS.
|
||||
wrapProgram $out/bin/qgis \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
--prefix PATH : ${lib.makeBinPath [ grass ]}
|
||||
|
Loading…
Reference in New Issue
Block a user