nixpkgs-suyu/pkgs/applications/gis/grass/default.nix
Orivej Desh fda26c8476 Merge branch 'master' into staging
* master: (271 commits)
  pysmbc: clarify license
  pysmbc: fix license
  bazel: 0.5.4 -> 0.6.0 (#29990)
  googler: init at 3.3
  go: declare support for aarch64
  firefox-beta-bin: 56.0b5 -> 57.0b4
  spotify: 1.0.64.401.g9d720389-21 -> 1.0.64.407.g9bd02c2d-26
  gogs: 0.11.19 -> 0.11.29
  grafana: 4.5.1 -> 4.5.2
  mopidy-iris: 3.4.1 -> 3.4.9
  nextcloud: 12.0.2 -> 12.0.3
  haskell-json-autotype: jailbreak to fix build within LTS 9.x
  kore: fix up
  kore: init at 2.0.0
  glusterfs service: fix issues with useRpcbind
  tig: 2.2.2 -> 2.3.0
  haskell-hspec-core: enable test suite again
  hackage-packages.nix: automatic Haskell package set update
  librsvg: fix thumbnailer path
  awscli: 1.11.108 -> 1.11.162
  ...
2017-10-02 00:22:12 +00:00

77 lines
2.8 KiB
Nix

{ stdenv, fetchurl, flex, bison, pkgconfig, zlib, libtiff, libpng, fftw
, cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas
, proj, gdal, geos, sqlite, postgresql, mysql, python2Packages
}:
stdenv.mkDerivation {
name = "grass-7.0.2";
src = fetchurl {
url = http://grass.osgeo.org/grass70/source/grass-7.0.2.tar.gz;
sha256 = "02qrdgn46gxr60amxwax4b8fkkmhmjxi6qh4yfvpbii6ai6diarf";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo
readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.client blas ]
++ (with python2Packages; [ python dateutil wxPython30 numpy ]);
configureFlags = [
"--with-proj-share=${proj}/share/proj"
"--without-opengl"
"--with-readline"
"--with-wxwidgets"
"--with-netcdf"
"--with-geos"
"--with-postgres" "--with-postgres-libs=${postgresql.lib}/lib/"
# it complains about missing libmysqld but doesn't really seem to need it
"--with-mysql" "--with-mysql-includes=${stdenv.lib.getDev mysql.client}/include/mysql"
"--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.krige/v.krige.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 \
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 \
temporal/t.select/t.select.py
for d in gui lib scripts temporal tools; do
patchShebangs $d
done
'';
postInstall = ''
wrapProgram $out/bin/grass70 \
--set PYTHONPATH $PYTHONPATH \
--set GRASS_PYTHON ${python2Packages.python}/bin/${python2Packages.python.executable} \
--suffix LD_LIBRARY_PATH ':' '${gdal}/lib'
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;
broken = true;
};
}