2021-09-28 08:13:01 +00:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, flex
|
|
|
|
, bison
|
|
|
|
, proj
|
|
|
|
, geos
|
|
|
|
, xlibsWrapper
|
|
|
|
, sqlite
|
|
|
|
, gsl
|
|
|
|
, qwt
|
|
|
|
, fcgi
|
|
|
|
, python3Packages
|
|
|
|
, libspatialindex
|
|
|
|
, libspatialite
|
|
|
|
, postgresql
|
|
|
|
, txt2tags
|
|
|
|
, openssl
|
|
|
|
, libzip
|
|
|
|
, hdf5
|
|
|
|
, netcdf
|
|
|
|
, exiv2
|
|
|
|
, protobuf
|
|
|
|
, qtbase
|
|
|
|
, qtsensors
|
|
|
|
, qca-qt5
|
|
|
|
, qtkeychain
|
|
|
|
, qscintilla
|
|
|
|
, qtserialport
|
|
|
|
, qtxmlpatterns
|
|
|
|
, withGrass ? true
|
|
|
|
, grass
|
|
|
|
, withWebKit ? true
|
|
|
|
, qtwebkit
|
|
|
|
}:
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
let
|
2021-04-17 00:35:05 +00:00
|
|
|
pythonBuildInputs = with python3Packages; [
|
|
|
|
qscintilla-qt5
|
|
|
|
gdal
|
|
|
|
jinja2
|
|
|
|
numpy
|
|
|
|
psycopg2
|
|
|
|
chardet
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil
|
2021-04-17 00:35:05 +00:00
|
|
|
pyyaml
|
|
|
|
pytz
|
|
|
|
requests
|
|
|
|
urllib3
|
|
|
|
pygments
|
|
|
|
pyqt5
|
2021-05-20 23:08:51 +00:00
|
|
|
sip_4
|
2021-04-17 00:35:05 +00:00
|
|
|
owslib
|
|
|
|
six
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
in mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "3.16.14";
|
2021-09-28 08:13:01 +00:00
|
|
|
pname = "qgis-unwrapped";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qgis";
|
|
|
|
repo = "QGIS";
|
2021-04-17 00:35:05 +00:00
|
|
|
rev = "final-${lib.replaceStrings [ "." ] [ "_" ] version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-3FUGSBdlhJhhpTPtYuzKOznsC7PJV3kRL9Il2Yryi1Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit pythonBuildInputs;
|
|
|
|
inherit python3Packages;
|
|
|
|
};
|
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
proj
|
|
|
|
geos
|
|
|
|
xlibsWrapper
|
|
|
|
sqlite
|
|
|
|
gsl
|
|
|
|
qwt
|
|
|
|
exiv2
|
|
|
|
protobuf
|
|
|
|
fcgi
|
|
|
|
libspatialindex
|
|
|
|
libspatialite
|
|
|
|
postgresql
|
|
|
|
txt2tags
|
|
|
|
libzip
|
|
|
|
hdf5
|
|
|
|
netcdf
|
|
|
|
qtbase
|
|
|
|
qtsensors
|
|
|
|
qca-qt5
|
|
|
|
qtkeychain
|
|
|
|
qscintilla
|
|
|
|
qtserialport
|
|
|
|
qtxmlpatterns
|
|
|
|
] ++ lib.optional withGrass grass
|
2020-12-25 13:55:36 +00:00
|
|
|
++ lib.optional withWebKit qtwebkit
|
|
|
|
++ pythonBuildInputs;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake flex bison ninja ];
|
|
|
|
|
|
|
|
# Force this pyqt_sip_dir variable to point to the sip dir in PyQt5
|
|
|
|
#
|
|
|
|
# TODO: Correct PyQt5 to provide the expected directory and fix
|
|
|
|
# build to use PYQT5_SIP_DIR consistently.
|
|
|
|
postPatch = ''
|
2021-04-17 00:35:05 +00:00
|
|
|
substituteInPlace cmake/FindPyQt5.py \
|
2021-06-28 23:13:55 +00:00
|
|
|
--replace 'sip_dir = cfg.default_sip_dir' 'sip_dir = "${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings"'
|
2021-04-17 00:35:05 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-17 00:35:05 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
2021-06-28 23:13:55 +00:00
|
|
|
"-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings"
|
2021-04-17 00:35:05 +00:00
|
|
|
"-DQSCI_SIP_DIR=${python3Packages.qscintilla-qt5}/share/sip/PyQt5"
|
|
|
|
] ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF"
|
|
|
|
++ lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A Free and Open Source Geographic Information System";
|
2020-12-25 13:55:36 +00:00
|
|
|
homepage = "https://www.qgis.org";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
platforms = with lib.platforms; linux;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with lib.maintainers; [ lsix sikmir erictapen ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|