2017-03-13 08:05:31 -07:00
|
|
|
{ stdenv, fetchurl, fetchpatch, gdal, cmake, qt4, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl
|
2016-11-08 06:17:06 -08:00
|
|
|
, qwt, fcgi, python2Packages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper
|
2016-09-11 12:19:53 -07:00
|
|
|
, qjson, qca2, txt2tags, openssl
|
2015-10-27 00:26:07 -07:00
|
|
|
, withGrass ? false, grass
|
|
|
|
}:
|
2008-12-19 17:20:35 -08:00
|
|
|
|
2011-08-11 02:35:17 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2018-02-27 12:55:26 -08:00
|
|
|
name = "qgis-2.18.16";
|
2009-03-06 15:21:28 -08:00
|
|
|
|
2016-09-11 12:19:53 -07:00
|
|
|
buildInputs = [ gdal qt4 flex openssl bison proj geos xlibsWrapper sqlite gsl qwt qscintilla
|
2016-08-01 09:01:09 -07:00
|
|
|
fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags ] ++
|
2015-10-27 00:26:07 -07:00
|
|
|
(stdenv.lib.optional withGrass grass) ++
|
2017-07-15 10:32:38 -07:00
|
|
|
(with python2Packages; [ jinja2 numpy psycopg2 pygments requests python2Packages.qscintilla sip ]);
|
2011-08-11 02:35:17 -07:00
|
|
|
|
2014-12-20 08:32:59 -08:00
|
|
|
nativeBuildInputs = [ cmake makeWrapper ];
|
2011-08-11 02:35:17 -07:00
|
|
|
|
2017-12-05 03:26:04 -08:00
|
|
|
# `make -f src/providers/wms/CMakeFiles/wmsprovider_a.dir/build.make src/providers/wms/CMakeFiles/wmsprovider_a.dir/qgswmssourceselect.cpp.o`:
|
2017-01-29 06:19:43 -08:00
|
|
|
# fatal error: ui_qgsdelimitedtextsourceselectbase.h: No such file or directory
|
2017-12-05 03:26:04 -08:00
|
|
|
enableParallelBuilding = false;
|
2013-07-18 02:40:23 -07:00
|
|
|
|
|
|
|
# To handle the lack of 'local' RPATH; required, as they call one of
|
|
|
|
# their built binaries requiring their libs, in the build process.
|
|
|
|
preBuild = ''
|
2016-09-11 12:19:53 -07:00
|
|
|
export LD_LIBRARY_PATH=`pwd`/output/lib:${stdenv.lib.makeLibraryPath [ openssl ]}:$LD_LIBRARY_PATH
|
2013-07-18 02:40:23 -07:00
|
|
|
'';
|
2009-03-06 15:21:28 -08:00
|
|
|
|
|
|
|
src = fetchurl {
|
2011-08-11 02:35:17 -07:00
|
|
|
url = "http://qgis.org/downloads/${name}.tar.bz2";
|
2018-02-27 12:55:26 -08:00
|
|
|
sha256 = "0d880m013kzi4qiyr27yjx6hzpb652slp66gyqgw9ziw03wy12c9";
|
2009-03-06 15:21:28 -08:00
|
|
|
};
|
|
|
|
|
2015-10-27 00:26:07 -07:00
|
|
|
cmakeFlags = stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}";
|
|
|
|
|
2014-12-20 08:32:59 -08:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/qgis \
|
2016-09-11 12:19:53 -07:00
|
|
|
--prefix PYTHONPATH : $PYTHONPATH \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ openssl ]}
|
2014-12-20 08:32:59 -08:00
|
|
|
'';
|
|
|
|
|
2009-03-06 15:21:28 -08:00
|
|
|
meta = {
|
2013-07-18 02:40:23 -07:00
|
|
|
description = "User friendly Open Source Geographic Information System";
|
|
|
|
homepage = http://www.qgis.org;
|
2014-06-18 21:19:00 -07:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2013-07-18 02:40:23 -07:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
2008-12-19 17:20:35 -08:00
|
|
|
};
|
|
|
|
}
|