diff options
Diffstat (limited to 'pkgs/applications/gis')
-rw-r--r-- | pkgs/applications/gis/gmt/default.nix | 139 | ||||
-rw-r--r-- | pkgs/applications/gis/grass/clang-integer-conversion.patch | 21 | ||||
-rw-r--r-- | pkgs/applications/gis/grass/default.nix | 70 | ||||
-rw-r--r-- | pkgs/applications/gis/qgis/default.nix | 13 | ||||
-rw-r--r-- | pkgs/applications/gis/qgis/ltr.nix | 13 | ||||
-rw-r--r-- | pkgs/applications/gis/qgis/set-pyqt-package-dirs-ltr.patch | 59 | ||||
-rw-r--r-- | pkgs/applications/gis/qgis/set-pyqt-package-dirs.patch | 10 | ||||
-rw-r--r-- | pkgs/applications/gis/qgis/unwrapped-ltr.nix | 26 | ||||
-rw-r--r-- | pkgs/applications/gis/qgis/unwrapped.nix | 25 | ||||
-rw-r--r-- | pkgs/applications/gis/spatialite-gui/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/gis/spatialite-tools/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/gis/udig/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/gis/whitebox-tools/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/gis/zombietrackergps/default.nix | 2 |
14 files changed, 235 insertions, 155 deletions
diff --git a/pkgs/applications/gis/gmt/default.nix b/pkgs/applications/gis/gmt/default.nix index 3cc04e3744400..9eb1bde4266d3 100644 --- a/pkgs/applications/gis/gmt/default.nix +++ b/pkgs/applications/gis/gmt/default.nix @@ -1,59 +1,98 @@ -{ lib, stdenv, fetchurl, cmake, curl, Accelerate, CoreGraphics, CoreVideo -, fftwSinglePrec, netcdf, pcre, gdal, blas, lapack, glibc, ghostscript, dcw-gmt -, gshhg-gmt }: +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + curl, + Accelerate, + CoreGraphics, + CoreVideo, + fftwSinglePrec, + netcdf, + libxml2, + pcre, + gdal, + blas, + lapack, + glibc, + ghostscript, + dcw-gmt, + gshhg-gmt, +}: -/* The onus is on the user to also install: - - ffmpeg for webm or mp4 output - - graphicsmagick for gif output +/* + The onus is on the user to also install: + - ffmpeg for webm or mp4 output + - graphicsmagick for gif output */ -stdenv.mkDerivation rec { +let + # Certainly not an ideal situation, See: + # https://github.com/NixOS/nixpkgs/pull/340707#issuecomment-2361894717 + netcdf' = netcdf.override { + libxml2 = libxml2.override { + enableHttp = true; + }; + }; +in stdenv.mkDerivation (finalAttrs: { pname = "gmt"; - version = "6.4.0"; - src = fetchurl { - url = "https://github.com/GenericMappingTools/gmt/releases/download/${version}/gmt-${version}-src.tar.gz"; - sha256 = "sha256-0mfAx9b7MMnqfgKe8n2tsm/9e5LLS0cD+aO6Do85Ohs="; + version = "6.5.0"; + src = fetchFromGitHub { + owner = "GenericMappingTools"; + repo = "gmt"; + rev = "refs/tags/${finalAttrs.version}"; + hash = "sha256-KKIYhljCtk9t9CuvTLsSGvUkUwazWTm9ymBB3wLwSoI="; }; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ + cmake + ]; - buildInputs = [ curl gdal netcdf pcre dcw-gmt gshhg-gmt ] - ++ (if stdenv.isDarwin then [ - Accelerate - CoreGraphics - CoreVideo - ] else [ - glibc - fftwSinglePrec - blas - lapack - ]); + buildInputs = + [ + curl + gdal + netcdf' + pcre + dcw-gmt + gshhg-gmt + ] + ++ ( + if stdenv.hostPlatform.isDarwin then + [ + Accelerate + CoreGraphics + CoreVideo + ] + else + [ + glibc + fftwSinglePrec + blas + lapack + ] + ); - propagatedBuildInputs = [ ghostscript ]; + propagatedBuildInputs = [ + ghostscript + ]; - cmakeFlags = [ - "-DGMT_DOCDIR=share/doc/gmt" - "-DGMT_MANDIR=share/man" - "-DGMT_LIBDIR=lib" - "-DCOPY_GSHHG:BOOL=FALSE" - "-DGSHHG_ROOT=${gshhg-gmt.out}/share/gshhg-gmt" - "-DCOPY_DCW:BOOL=FALSE" - "-DDCW_ROOT=${dcw-gmt.out}/share/dcw-gmt" - "-DGDAL_ROOT=${gdal.out}" - "-DNETCDF_ROOT=${netcdf.out}" - "-DPCRE_ROOT=${pcre.out}" - "-DGMT_INSTALL_TRADITIONAL_FOLDERNAMES:BOOL=FALSE" - "-DGMT_ENABLE_OPENMP:BOOL=TRUE" - "-DGMT_INSTALL_MODULE_LINKS:BOOL=FALSE" - "-DLICENSE_RESTRICTED=LGPL" # "GPL" and "no" also valid - ] ++ (with stdenv; - lib.optionals (!isDarwin) [ - "-DFFTW3_ROOT=${fftwSinglePrec.dev}" - "-DLAPACK_LIBRARY=${lapack}/lib/liblapack.so" - "-DBLAS_LIBRARY=${blas}/lib/libblas.so" - ]); + cmakeFlags = + [ + "-DGMT_DOCDIR=share/doc/gmt" + "-DGMT_MANDIR=share/man" + "-DGMT_LIBDIR=lib" + "-DCOPY_GSHHG:BOOL=FALSE" + "-DGSHHG_ROOT=${gshhg-gmt.out}/share/gshhg-gmt" + "-DCOPY_DCW:BOOL=FALSE" + "-DDCW_ROOT=${dcw-gmt.out}/share/dcw-gmt" + "-DGMT_INSTALL_TRADITIONAL_FOLDERNAMES:BOOL=FALSE" + "-DGMT_ENABLE_OPENMP:BOOL=TRUE" + "-DGMT_INSTALL_MODULE_LINKS:BOOL=FALSE" + "-DLICENSE_RESTRICTED=LGPL" # "GPL" and "no" also valid + ]; - meta = with lib; { + meta = { homepage = "https://www.generic-mapping-tools.org"; description = "Tools for manipulating geographic and cartesian data sets"; longDescription = '' @@ -65,9 +104,9 @@ stdenv.mkDerivation rec { transformations and includes supporting data such as coastlines, rivers, and political boundaries and optionally country polygons. ''; - platforms = [ "x86_64-linux" "x86_64-darwin" ]; - license = licenses.lgpl3Plus; - maintainers = with maintainers; [ tviti ]; + platforms = lib.platforms.unix; + license = lib.licenses.lgpl3Plus; + maintainers = with lib.maintainers; [ tviti ]; }; -} +}) diff --git a/pkgs/applications/gis/grass/clang-integer-conversion.patch b/pkgs/applications/gis/grass/clang-integer-conversion.patch deleted file mode 100644 index 85145f45c37d0..0000000000000 --- a/pkgs/applications/gis/grass/clang-integer-conversion.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ur a/db/drivers/mysql/db.c b/db/drivers/mysql/db.c ---- a/db/drivers/mysql/db.c 1969-12-31 19:00:01.000000000 -0500 -+++ b/db/drivers/mysql/db.c 2023-11-09 23:26:25.329700495 -0500 -@@ -52,9 +52,16 @@ - - db_get_login2("mysql", name, &user, &password, &host, &port); - -+ const char* errstr; -+ unsigned int port_number = (unsigned int)strtonum(port, 0, 65536, &errstr); -+ if (errstr != NULL) { -+ db_d_append_error("%s", errstr); -+ return DB_FAILED; -+ } -+ - connection = mysql_init(NULL); - res = mysql_real_connect(connection, host, user, password, -- connpar.dbname, port, NULL, 0); -+ connpar.dbname, port_number, NULL, 0); - - if (res == NULL) { - db_d_append_error("%s\n%s", _("Connection failed."), diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix index 4eb10a34d2e24..68bbcb46b5260 100644 --- a/pkgs/applications/gis/grass/default.nix +++ b/pkgs/applications/gis/grass/default.nix @@ -5,25 +5,31 @@ , makeWrapper , wrapGAppsHook3 +, withOpenGL ? !stdenv.hostPlatform.isDarwin + , bison , blas , cairo , ffmpeg , fftw , flex +, freetype , gdal , geos +, lapack +, libGLU , libiconv -, libmysqlclient , libpng +, libsvm , libtiff , libxml2 +, llvmPackages , netcdf , pdal , pkg-config , postgresql , proj -, python3Packages +, python311Packages , readline , sqlite , wxGTK32 @@ -31,15 +37,19 @@ , zstd }: +let + pyPackages = python311Packages; + +in stdenv.mkDerivation (finalAttrs: { pname = "grass"; - version = "8.3.2"; + version = "8.4.0"; src = fetchFromGitHub { owner = "OSGeo"; repo = "grass"; rev = finalAttrs.version; - hash = "sha256-loeg+7h676d2WdYOMcJFyzeEZcxjBynir6Hz0J/GBns="; + hash = "sha256-NKMshd6pr2O62ZjmQ/oPttmeVBYVD0Nqhh3SwQrhZf8="; }; nativeBuildInputs = [ @@ -50,22 +60,23 @@ stdenv.mkDerivation (finalAttrs: { flex gdal # for `gdal-config` geos # for `geos-config` - libmysqlclient # for `mysql_config` netcdf # for `nc-config` pkg-config - ] ++ (with python3Packages; [ python-dateutil numpy wxpython ]); + ] ++ (with pyPackages; [ python-dateutil numpy wxpython ]); buildInputs = [ blas cairo ffmpeg fftw + freetype gdal geos - libmysqlclient + lapack libpng + libsvm libtiff - libxml2 + (libxml2.override { enableHttp = true; }) netcdf pdal postgresql @@ -75,44 +86,45 @@ stdenv.mkDerivation (finalAttrs: { wxGTK32 zlib zstd - ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ] ++ lib.optionals withOpenGL [ libGLU ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ] + ++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ]; strictDeps = true; - patches = lib.optionals stdenv.isDarwin [ - # Fix conversion of const char* to unsigned int. - ./clang-integer-conversion.patch - ]; - - # Correct mysql_config query - postPatch = '' - substituteInPlace configure --replace "--libmysqld-libs" "--libs" - ''; - configureFlags = [ "--with-blas" + "--with-cairo-ldflags=-lfontconfig" + "--with-cxx" + "--with-fftw" + "--with-freetype" "--with-geos" - # It complains about missing libmysqld but doesn't really seem to need it - "--with-mysql" - "--with-mysql-includes=${lib.getDev libmysqlclient}/include/mysql" - "--with-mysql-libs=${libmysqlclient}/lib/mysql" - "--with-netcdf" + "--with-gdal" + "--with-lapack" + "--with-libsvm" + "--with-nls" + "--with-openmp" + "--with-pdal" "--with-postgres" "--with-postgres-libs=${postgresql.lib}/lib/" "--with-proj-includes=${proj.dev}/include" "--with-proj-libs=${proj}/lib" "--with-proj-share=${proj}/share/proj" - "--with-pthread" - "--with-readline" + "--with-sqlite" + "--with-zstd" + "--without-bzlib" + "--without-mysql" + "--without-odbc" + ] ++ lib.optionals (! withOpenGL) [ "--without-opengl" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--without-cairo" "--without-freetype" "--without-x" ]; # Otherwise a very confusing "Can't load GDAL library" error - makeFlags = lib.optional stdenv.isDarwin "GDAL_DYNAMIC="; + makeFlags = lib.optional stdenv.hostPlatform.isDarwin "GDAL_DYNAMIC="; /* Ensures that the python script run at build time are actually executable; * otherwise, patchShebangs ignores them. */ @@ -127,7 +139,7 @@ stdenv.mkDerivation (finalAttrs: { postInstall = '' wrapProgram $out/bin/grass \ --set PYTHONPATH $PYTHONPATH \ - --set GRASS_PYTHON ${python3Packages.python.interpreter} \ + --set GRASS_PYTHON ${pyPackages.python.interpreter} \ --suffix LD_LIBRARY_PATH ':' '${gdal}/lib' ln -s $out/grass*/lib $out/lib ln -s $out/grass*/include $out/include diff --git a/pkgs/applications/gis/qgis/default.nix b/pkgs/applications/gis/qgis/default.nix index 8b19c70c3b4d0..5e22cc9aa0161 100644 --- a/pkgs/applications/gis/qgis/default.nix +++ b/pkgs/applications/gis/qgis/default.nix @@ -1,5 +1,4 @@ -{ lib -, makeWrapper +{ makeWrapper , nixosTests , symlinkJoin @@ -25,13 +24,13 @@ in symlinkJoin rec { pythonInputs = qgis-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-unwrapped.py.pkgs); postBuild = '' - # unpackPhase - buildPythonPath "$pythonInputs" - wrapProgram $out/bin/qgis \ - --prefix PATH : $program_PATH \ - --set PYTHONPATH $program_PYTHONPATH + for program in $out/bin/*; do + wrapProgram $program \ + --prefix PATH : $program_PATH \ + --set PYTHONPATH $program_PYTHONPATH + done ''; passthru = { diff --git a/pkgs/applications/gis/qgis/ltr.nix b/pkgs/applications/gis/qgis/ltr.nix index b551fe0a1e44d..53e6069e87071 100644 --- a/pkgs/applications/gis/qgis/ltr.nix +++ b/pkgs/applications/gis/qgis/ltr.nix @@ -1,5 +1,4 @@ -{ lib -, makeWrapper +{ makeWrapper , nixosTests , symlinkJoin @@ -25,13 +24,13 @@ in symlinkJoin rec { pythonInputs = qgis-ltr-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-ltr-unwrapped.py.pkgs); postBuild = '' - # unpackPhase - buildPythonPath "$pythonInputs" - wrapProgram $out/bin/qgis \ - --prefix PATH : $program_PATH \ - --set PYTHONPATH $program_PYTHONPATH + for program in $out/bin/*; do + wrapProgram $program \ + --prefix PATH : $program_PATH \ + --set PYTHONPATH $program_PYTHONPATH + done ''; passthru = { diff --git a/pkgs/applications/gis/qgis/set-pyqt-package-dirs-ltr.patch b/pkgs/applications/gis/qgis/set-pyqt-package-dirs-ltr.patch new file mode 100644 index 0000000000000..725c0b350e824 --- /dev/null +++ b/pkgs/applications/gis/qgis/set-pyqt-package-dirs-ltr.patch @@ -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 "${PYQT_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 +@@ -212,7 +212,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) diff --git a/pkgs/applications/gis/qgis/set-pyqt-package-dirs.patch b/pkgs/applications/gis/qgis/set-pyqt-package-dirs.patch index 725c0b350e824..a1771d9f03d39 100644 --- a/pkgs/applications/gis/qgis/set-pyqt-package-dirs.patch +++ b/pkgs/applications/gis/qgis/set-pyqt-package-dirs.patch @@ -11,16 +11,6 @@ index b51fd0075e..87ee317e05 100644 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 diff --git a/pkgs/applications/gis/qgis/unwrapped-ltr.nix b/pkgs/applications/gis/qgis/unwrapped-ltr.nix index aa313fef857cc..17af854eabda0 100644 --- a/pkgs/applications/gis/qgis/unwrapped-ltr.nix +++ b/pkgs/applications/gis/qgis/unwrapped-ltr.nix @@ -29,7 +29,7 @@ , postgresql , proj , protobuf -, python3 +, python311 , qca-qt5 , qscintilla , qt3d @@ -48,7 +48,8 @@ }: let - py = python3.override { + py = python311.override { + self = py; packageOverrides = self: super: { pyqt5 = super.pyqt5.override { withLocation = true; @@ -77,14 +78,14 @@ let urllib3 ]; in mkDerivation rec { - version = "3.34.7"; + version = "3.34.11"; pname = "qgis-ltr-unwrapped"; src = fetchFromGitHub { owner = "qgis"; repo = "QGIS"; rev = "final-${lib.replaceStrings [ "." ] [ "_" ] version}"; - hash = "sha256-6fIBmIoCVo0AtkjC4Vn3jMjz93gZmvkFAgo+KnasyXo="; + hash = "sha256-VNgUMEA7VKZXsLG1ZYUIlYvjwRrH8LsliGiVRMnXOM0="; }; passthru = { @@ -139,7 +140,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}"; }) @@ -147,12 +148,9 @@ 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 - ''; + env.QT_QPA_PLATFORM_PLUGIN_PATH="${qtbase}/${qtbase.qtPluginPrefix}/platforms"; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DWITH_3D=True" "-DWITH_PDAL=True" "-DENABLE_TESTS=False" @@ -164,7 +162,7 @@ in mkDerivation rec { ); qtWrapperArgs = [ - "--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-${qtbase.version}/plugins/platforms" + "--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase}/${qtbase.qtPluginPrefix}/platforms" ]; dontWrapGApps = true; # wrapper params passed below @@ -174,9 +172,11 @@ in mkDerivation rec { # the path at build time using GRASS_PREFIX. # Using wrapGAppsHook also prevents file dialogs from crashing the program # on non-NixOS. - wrapProgram $out/bin/qgis \ - "''${gappsWrapperArgs[@]}" \ - --prefix PATH : ${lib.makeBinPath [ grass ]} + for program in $out/bin/*; do + wrapProgram $program \ + "''${gappsWrapperArgs[@]}" \ + --prefix PATH : ${lib.makeBinPath [ grass ]} + done ''; meta = with lib; { diff --git a/pkgs/applications/gis/qgis/unwrapped.nix b/pkgs/applications/gis/qgis/unwrapped.nix index c20e9209f0746..97349b31845b1 100644 --- a/pkgs/applications/gis/qgis/unwrapped.nix +++ b/pkgs/applications/gis/qgis/unwrapped.nix @@ -29,7 +29,7 @@ , postgresql , proj , protobuf -, python3 +, python311 , qca-qt5 , qscintilla , qt3d @@ -48,7 +48,8 @@ }: let - py = python3.override { + py = python311.override { + self = py; packageOverrides = self: super: { pyqt5 = super.pyqt5.override { withLocation = true; @@ -78,14 +79,14 @@ let urllib3 ]; in mkDerivation rec { - version = "3.36.3"; + version = "3.38.3"; pname = "qgis-unwrapped"; src = fetchFromGitHub { owner = "qgis"; repo = "QGIS"; rev = "final-${lib.replaceStrings [ "." ] [ "_" ] version}"; - hash = "sha256-uPyW/zzoyyd3SXvP+h9joJEv9DjRNJSaorx1rNmAaFQ="; + hash = "sha256-yJFYq4t0LzBr+O2bmtBSeehQ2vfUaZIQfOY68WZcHG4="; }; passthru = { @@ -148,15 +149,13 @@ 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 - ''; + env.QT_QPA_PLATFORM_PLUGIN_PATH="${qtbase}/${qtbase.qtPluginPrefix}/platforms"; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DWITH_3D=True" "-DWITH_PDAL=True" "-DENABLE_TESTS=False" + "-DQT_PLUGINS_DIR=${qtbase}/${qtbase.qtPluginPrefix}" ] ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF" ++ lib.optional withGrass (let gmajor = lib.versions.major grass.version; @@ -165,7 +164,7 @@ in mkDerivation rec { ); qtWrapperArgs = [ - "--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-${qtbase.version}/plugins/platforms" + "--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase}/${qtbase.qtPluginPrefix}/platforms" ]; dontWrapGApps = true; # wrapper params passed below @@ -175,9 +174,11 @@ in mkDerivation rec { # the path at build time using GRASS_PREFIX. # Using wrapGAppsHook also prevents file dialogs from crashing the program # on non-NixOS. - wrapProgram $out/bin/qgis \ - "''${gappsWrapperArgs[@]}" \ - --prefix PATH : ${lib.makeBinPath [ grass ]} + for program in $out/bin/*; do + wrapProgram $program \ + "''${gappsWrapperArgs[@]}" \ + --prefix PATH : ${lib.makeBinPath [ grass ]} + done ''; meta = with lib; { diff --git a/pkgs/applications/gis/spatialite-gui/default.nix b/pkgs/applications/gis/spatialite-gui/default.nix index b33818e354867..a8bdedabaa374 100644 --- a/pkgs/applications/gis/spatialite-gui/default.nix +++ b/pkgs/applications/gis/spatialite-gui/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ] - ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; + ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; buildInputs = [ curl @@ -59,11 +59,11 @@ stdenv.mkDerivation rec { wxGTK xz zstd - ] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa IOKit ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa IOKit ]; enableParallelBuilding = true; - postFixup = lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' rm -fr $out/share ''; diff --git a/pkgs/applications/gis/spatialite-tools/default.nix b/pkgs/applications/gis/spatialite-tools/default.nix index cdd7911a5d3fa..0b3f7f498f777 100644 --- a/pkgs/applications/gis/spatialite-tools/default.nix +++ b/pkgs/applications/gis/spatialite-tools/default.nix @@ -8,6 +8,7 @@ , librttopo , libspatialite , libxml2 +, libz , minizip , proj , readosm @@ -34,6 +35,7 @@ stdenv.mkDerivation rec { librttopo libspatialite libxml2 + libz minizip proj readosm diff --git a/pkgs/applications/gis/udig/default.nix b/pkgs/applications/gis/udig/default.nix index 264445336cd3d..04740f55b0654 100644 --- a/pkgs/applications/gis/udig/default.nix +++ b/pkgs/applications/gis/udig/default.nix @@ -63,6 +63,6 @@ let ''; }; in -if stdenv.isDarwin +if stdenv.hostPlatform.isDarwin then darwin else linux diff --git a/pkgs/applications/gis/whitebox-tools/default.nix b/pkgs/applications/gis/whitebox-tools/default.nix index df2343d8813e5..199595a658385 100644 --- a/pkgs/applications/gis/whitebox-tools/default.nix +++ b/pkgs/applications/gis/whitebox-tools/default.nix @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec { glib gtk3 openssl - ] ++ lib.optional stdenv.isDarwin Security; + ] ++ lib.optional stdenv.hostPlatform.isDarwin Security; nativeBuildInputs = [ cmake diff --git a/pkgs/applications/gis/zombietrackergps/default.nix b/pkgs/applications/gis/zombietrackergps/default.nix index 4acedbac2a2f8..762777bf8acf5 100644 --- a/pkgs/applications/gis/zombietrackergps/default.nix +++ b/pkgs/applications/gis/zombietrackergps/default.nix @@ -18,7 +18,7 @@ mkDerivation rec { # latest revision is not tagged upstream, use commit sha in the meantime #rev = "v_${version}"; rev = "cc75d5744965cc6973323f5bb77f00b0b0153dce"; - sha256 = "sha256-z/LFNRFdQQFxEWyAjcuGezRbTsv8z6Q6fK8NLjP4HNM="; + hash = "sha256-z/LFNRFdQQFxEWyAjcuGezRbTsv8z6Q6fK8NLjP4HNM="; }; buildInputs = |