2019-09-09 19:59:38 +01:00
|
|
|
{ mkDerivation, lib, fetchFromGitHub, cmake, ninja, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl
|
2019-02-27 21:08:06 +00:00
|
|
|
, qwt, fcgi, python3Packages, libspatialindex, libspatialite, postgresql
|
2019-07-14 02:56:44 +01:00
|
|
|
, txt2tags, openssl, libzip, hdf5, netcdf, exiv2
|
2019-02-27 21:08:06 +00:00
|
|
|
, qtbase, qtwebkit, qtsensors, qca-qt5, qtkeychain, qscintilla, qtserialport, qtxmlpatterns
|
|
|
|
, withGrass ? true, grass
|
|
|
|
}:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
pythonBuildInputs = with python3Packages;
|
|
|
|
[ qscintilla-qt5 gdal jinja2 numpy psycopg2
|
|
|
|
chardet dateutil pyyaml pytz requests urllib3 pygments pyqt5 sip owslib six ];
|
2019-09-09 19:59:38 +01:00
|
|
|
in mkDerivation rec {
|
2020-10-08 17:37:01 +01:00
|
|
|
version = "3.10.10";
|
2019-07-14 02:56:44 +01:00
|
|
|
pname = "qgis";
|
|
|
|
name = "${pname}-unwrapped-${version}";
|
2019-02-27 21:08:06 +00:00
|
|
|
|
2019-07-14 02:56:44 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qgis";
|
|
|
|
repo = "QGIS";
|
|
|
|
rev = "final-${lib.replaceStrings ["."] ["_"] version}";
|
2020-10-08 17:37:01 +01:00
|
|
|
sha256 = "yZBG+bpJA7iKkUEjVo45d+bmRp9WS7mk8z96FLf0ZQ0=";
|
2019-02-27 21:08:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit pythonBuildInputs;
|
|
|
|
inherit python3Packages;
|
|
|
|
};
|
|
|
|
|
2019-07-14 02:56:44 +01:00
|
|
|
buildInputs = [ openssl proj geos xlibsWrapper sqlite gsl qwt exiv2
|
2019-02-27 21:08:06 +00:00
|
|
|
fcgi libspatialindex libspatialite postgresql txt2tags libzip hdf5 netcdf
|
|
|
|
qtbase qtwebkit qtsensors qca-qt5 qtkeychain qscintilla qtserialport qtxmlpatterns] ++
|
2019-09-09 19:59:38 +01:00
|
|
|
(lib.optional withGrass grass) ++ pythonBuildInputs;
|
2019-02-27 21:08:06 +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 = ''
|
|
|
|
substituteInPlace cmake/FindPyQt5.py \
|
2019-07-14 02:56:44 +01:00
|
|
|
--replace 'sip_dir = cfg.default_sip_dir' 'sip_dir = "${python3Packages.pyqt5}/share/sip/PyQt5"'
|
2019-02-27 21:08:06 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
|
|
|
"-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/share/sip/PyQt5"
|
|
|
|
"-DQSCI_SIP_DIR=${python3Packages.qscintilla-qt5}/share/sip/PyQt5" ] ++
|
2019-09-09 19:59:38 +01:00
|
|
|
lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}";
|
2019-02-27 21:08:06 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A Free and Open Source Geographic Information System";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.qgis.org";
|
2019-09-09 19:59:38 +01:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
platforms = with lib.platforms; linux;
|
|
|
|
maintainers = with lib.maintainers; [ lsix ];
|
2019-02-27 21:08:06 +00:00
|
|
|
};
|
|
|
|
}
|