qgis: alphabetical sorting of dependencies

This commit is contained in:
Ivan Mincik 2023-08-22 10:59:32 +02:00
parent e831daaf4d
commit 85cf505bdf

View File

@ -1,50 +1,52 @@
{ lib { lib
, mkDerivation
, fetchFromGitHub , fetchFromGitHub
, cmake , makeWrapper
, ninja , mkDerivation
, flex , substituteAll
, wrapGAppsHook
, wrapQtAppsHook
, withGrass ? true
, withWebKit ? false
, bison , bison
, proj , cmake
, geos , exiv2
, sqlite
, gsl
, qwt
, fcgi , fcgi
, python3 , flex
, geos
, grass
, gsl
, hdf5
, libspatialindex , libspatialindex
, libspatialite , libspatialite
, postgresql
, txt2tags
, openssl
, libzip , libzip
, hdf5
, netcdf , netcdf
, exiv2 , ninja
, openssl
, pdal
, postgresql
, proj
, protobuf , protobuf
, qtbase , python3
, qtsensors
, qca-qt5 , qca-qt5
, qtkeychain
, qt3d
, qscintilla , qscintilla
, qt3d
, qtbase
, qtkeychain
, qtlocation , qtlocation
, qtmultimedia , qtmultimedia
, qtsensors
, qtserialport , qtserialport
, qtxmlpatterns
, withGrass ? true
, grass
, withWebKit ? false
, qtwebkit , qtwebkit
, pdal , qtxmlpatterns
, qwt
, sqlite
, txt2tags
, zstd , zstd
, makeWrapper
, wrapGAppsHook
, substituteAll
}: }:
let let
py = python3.override { py = python3.override {
packageOverrides = self: super: { packageOverrides = self: super: {
pyqt5 = super.pyqt5.override { pyqt5 = super.pyqt5.override {
@ -54,34 +56,34 @@ let
}; };
pythonBuildInputs = with py.pkgs; [ pythonBuildInputs = with py.pkgs; [
qscintilla-qt5 chardet
gdal gdal
jinja2 jinja2
numpy numpy
psycopg2
chardet
python-dateutil
pyyaml
pytz
requests
urllib3
pygments
pyqt5
pyqt-builder
sip
setuptools
owslib owslib
psycopg2
pygments
pyqt-builder
pyqt5
python-dateutil
pytz
pyyaml
qscintilla-qt5
requests
setuptools
sip
six six
urllib3
]; ];
in mkDerivation rec { in mkDerivation rec {
version = "3.30.1"; version = "3.32.2";
pname = "qgis-unwrapped"; pname = "qgis-unwrapped";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "qgis"; owner = "qgis";
repo = "QGIS"; repo = "QGIS";
rev = "final-${lib.replaceStrings [ "." ] [ "_" ] version}"; rev = "final-${lib.replaceStrings [ "." ] [ "_" ] version}";
hash = "sha256-MB0EQVJO5WLgqjdh8A7X45CpNvf7239wkZWciNfY3gY="; hash = "sha256-4Hcppzgst6v7SR/06ZICSujC4Gfckd/X5Mj40fh9OOU=";
}; };
passthru = { passthru = {
@ -89,41 +91,50 @@ in mkDerivation rec {
inherit py; inherit py;
}; };
nativeBuildInputs = [
makeWrapper
wrapGAppsHook
wrapQtAppsHook
cmake
flex
bison
ninja
];
buildInputs = [ buildInputs = [
openssl
proj
geos
sqlite
gsl
qwt
exiv2 exiv2
protobuf
fcgi fcgi
geos
gsl
hdf5
libspatialindex libspatialindex
libspatialite libspatialite
postgresql
txt2tags
libzip libzip
hdf5
netcdf netcdf
qtbase openssl
qtsensors pdal
postgresql
proj
protobuf
qca-qt5 qca-qt5
qtkeychain
qscintilla qscintilla
qt3d
qtbase
qtkeychain
qtlocation qtlocation
qtmultimedia qtmultimedia
qtsensors
qtserialport qtserialport
qtxmlpatterns qtxmlpatterns
qt3d qwt
pdal sqlite
txt2tags
zstd zstd
] ++ lib.optional withGrass grass ] ++ lib.optional withGrass grass
++ lib.optional withWebKit qtwebkit ++ lib.optional withWebKit qtwebkit
++ pythonBuildInputs; ++ pythonBuildInputs;
nativeBuildInputs = [ makeWrapper wrapGAppsHook cmake flex bison ninja ];
patches = [ patches = [
(substituteAll { (substituteAll {
src = ./set-pyqt-package-dirs.patch; src = ./set-pyqt-package-dirs.patch;
@ -132,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 = [ cmakeFlags = [
"-DWITH_3D=True" "-DWITH_3D=True"
"-DWITH_PDAL=TRUE" "-DWITH_PDAL=TRUE"
@ -142,13 +159,17 @@ in mkDerivation rec {
in "-DGRASS_PREFIX${gmajor}=${grass}/grass${gmajor}${gminor}" 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 dontWrapGApps = true; # wrapper params passed below
postFixup = lib.optionalString withGrass '' 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. # the path at build time using GRASS_PREFIX.
# using wrapGAppsHook also prevents file dialogs from crashing the program # Using wrapGAppsHook also prevents file dialogs from crashing the program
# on non-NixOS # on non-NixOS.
wrapProgram $out/bin/qgis \ wrapProgram $out/bin/qgis \
"''${gappsWrapperArgs[@]}" \ "''${gappsWrapperArgs[@]}" \
--prefix PATH : ${lib.makeBinPath [ grass ]} --prefix PATH : ${lib.makeBinPath [ grass ]}