about summary refs log tree commit diff
path: root/pkgs/applications/gis/grass/default.nix
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2015-09-18 19:01:01 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-11-09 15:50:12 +0100
commit931b56bafc794eb534231d17bc1e4d871bf743f4 (patch)
tree9927ac8cb283b16f0c655bc3cff1ea10be46aa78 /pkgs/applications/gis/grass/default.nix
parent23845d7084583a87ca30bb937d4c44b3c203b3af (diff)
grass: 6.4.0RC6 -> 7.0.1
Diffstat (limited to 'pkgs/applications/gis/grass/default.nix')
-rw-r--r--pkgs/applications/gis/grass/default.nix73
1 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix
new file mode 100644
index 0000000000000..13f9fe6bd7741
--- /dev/null
+++ b/pkgs/applications/gis/grass/default.nix
@@ -0,0 +1,73 @@
+{ stdenv, fetchurl, flex, bison, pkgconfig, zlib, libtiff, libpng, fftw
+, cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas
+, proj, gdal, geos, sqlite, postgresql, mysql, pythonPackages
+}:
+
+stdenv.mkDerivation {
+  name = "grass-7.0.1";
+  src = fetchurl {
+    url = http://grass.osgeo.org/grass70/source/grass-7.0.1.tar.gz;
+    sha256 = "0ps0xfsgls1hai8fx8x74ajh3560p1yjql2sg02lpqpx30bdv1q9";
+  };
+
+  buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite pkgconfig cairo
+  readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.lib blas ]
+    ++ (with pythonPackages; [ python dateutil wxPython30 numpy sqlite3 ]);
+
+  configureFlags = [
+    "--with-proj-share=${proj}/share/proj"
+    "--without-opengl"
+    "--with-readline"
+    "--with-wxwidgets"
+    "--with-netcdf"
+    "--with-geos"
+    "--with-postgres"
+    "--with-mysql" "--with-mysql-includes=${mysql.lib}/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 ${pythonPackages.python}/bin/${pythonPackages.python.executable}
+    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;
+  };
+}