2015-09-18 17:01:01 +00:00
|
|
|
{ stdenv, fetchurl, flex, bison, pkgconfig, zlib, libtiff, libpng, fftw
|
|
|
|
, cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas
|
2018-03-20 22:34:17 +00:00
|
|
|
, proj, gdal, geos, sqlite, postgresql, mysql, python2Packages
|
2015-09-18 17:01:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2017-12-28 16:28:26 +00:00
|
|
|
name = "grass-7.2.2";
|
2015-09-18 17:01:01 +00:00
|
|
|
src = fetchurl {
|
2017-12-28 16:28:26 +00:00
|
|
|
url = http://grass.osgeo.org/grass72/source/grass-7.2.2.tar.gz;
|
|
|
|
sha256 = "0yzljbrxlqp4wbw08n1dvmm4vmwkg8glf1ff4xyh589r5ryb7gxv";
|
2015-09-18 17:01:01 +00:00
|
|
|
};
|
|
|
|
|
2017-09-05 21:26:13 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo
|
2017-12-28 16:28:26 +00:00
|
|
|
readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.connector-c blas ]
|
2016-11-08 14:39:15 +00:00
|
|
|
++ (with python2Packages; [ python dateutil wxPython30 numpy ]);
|
2015-09-18 17:01:01 +00:00
|
|
|
|
2018-03-13 09:04:18 +00:00
|
|
|
# On Darwin the installer tries to symlink the help files into a system
|
|
|
|
# directory
|
2018-03-20 22:34:17 +00:00
|
|
|
patches = [ ./no_symbolic_links.patch ];
|
2018-03-13 09:04:18 +00:00
|
|
|
|
2015-09-18 17:01:01 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-proj-share=${proj}/share/proj"
|
|
|
|
"--without-opengl"
|
|
|
|
"--with-readline"
|
|
|
|
"--with-wxwidgets"
|
|
|
|
"--with-netcdf"
|
|
|
|
"--with-geos"
|
2017-12-28 08:58:46 +00:00
|
|
|
"--with-postgres"
|
|
|
|
"--with-postgres-libs=${postgresql.lib}/lib/"
|
2016-08-01 15:46:30 +00:00
|
|
|
# it complains about missing libmysqld but doesn't really seem to need it
|
2017-12-28 08:58:46 +00:00
|
|
|
"--with-mysql"
|
|
|
|
"--with-mysql-includes=${mysql.connector-c}/include/mysql"
|
|
|
|
"--with-mysql-libs=${mysql.connector-c}/lib/mysql"
|
2015-09-18 17:01:01 +00:00
|
|
|
"--with-blas"
|
|
|
|
];
|
|
|
|
|
|
|
|
/* Ensures that the python script run at build time are actually executable;
|
|
|
|
* otherwise, patchShebangs ignores them. */
|
|
|
|
postConfigure = ''
|
|
|
|
chmod +x scripts/d.out.file/d.out.file.py \
|
|
|
|
scripts/d.to.rast/d.to.rast.py \
|
|
|
|
scripts/d.what.rast/d.what.rast.py \
|
|
|
|
scripts/d.what.vect/d.what.vect.py \
|
|
|
|
scripts/g.extension/g.extension.py \
|
|
|
|
scripts/g.extension.all/g.extension.all.py \
|
|
|
|
scripts/r.pack/r.pack.py \
|
|
|
|
scripts/r.tileset/r.tileset.py \
|
|
|
|
scripts/r.unpack/r.unpack.py \
|
|
|
|
scripts/v.rast.stats/v.rast.stats.py \
|
|
|
|
scripts/v.to.lines/v.to.lines.py \
|
|
|
|
scripts/v.what.strds/v.what.strds.py \
|
|
|
|
scripts/v.unpack/v.unpack.py \
|
|
|
|
scripts/wxpyimgview/*.py \
|
|
|
|
gui/wxpython/animation/g.gui.animation.py \
|
2017-12-28 16:28:26 +00:00
|
|
|
gui/wxpython/datacatalog/g.gui.datacatalog.py \
|
2015-09-18 17:01:01 +00:00
|
|
|
gui/wxpython/rlisetup/g.gui.rlisetup.py \
|
|
|
|
gui/wxpython/vdigit/g.gui.vdigit.py \
|
|
|
|
temporal/t.rast.accumulate/t.rast.accumulate.py \
|
|
|
|
temporal/t.rast.accdetect/t.rast.accdetect.py \
|
2017-12-28 16:28:26 +00:00
|
|
|
temporal/t.rast.algebra/t.rast.algebra.py \
|
|
|
|
temporal/t.rast3d.algebra/t.rast3d.algebra.py \
|
|
|
|
temporal/t.vect.algebra/t.vect.algebra.py \
|
2015-09-18 17:01:01 +00:00
|
|
|
temporal/t.select/t.select.py
|
|
|
|
for d in gui lib scripts temporal tools; do
|
|
|
|
patchShebangs $d
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2017-12-28 16:28:26 +00:00
|
|
|
wrapProgram $out/bin/grass72 \
|
2015-09-18 17:01:01 +00:00
|
|
|
--set PYTHONPATH $PYTHONPATH \
|
2017-01-14 13:55:18 +00:00
|
|
|
--set GRASS_PYTHON ${python2Packages.python}/bin/${python2Packages.python.executable} \
|
2016-12-16 15:10:23 +00:00
|
|
|
--suffix LD_LIBRARY_PATH ':' '${gdal}/lib'
|
2015-09-18 17:01:01 +00:00
|
|
|
ln -s $out/grass-*/lib $out/lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://grass.osgeo.org/;
|
|
|
|
description = "GIS software suite used for geospatial data management and analysis, image processing, graphics and maps production, spatial modeling, and visualization";
|
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|