about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/gis/grass/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-02-22 10:43:06 +0000
committerAlyssa Ross <hi@alyssa.is>2022-03-11 16:17:56 +0000
commitca1aada113c0ebda1ab8667199f6453f8e01c4fc (patch)
tree55e402280096f62eb0bc8bcad5ce6050c5a0aec7 /nixpkgs/pkgs/applications/gis/grass/default.nix
parente4df5a52a6a6531f32626f57205356a773ac2975 (diff)
parent93883402a445ad467320925a0a5dbe43a949f25b (diff)
downloadnixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.gz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.bz2
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.lz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.xz
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.zst
nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.zip
Merge commit '93883402a445ad467320925a0a5dbe43a949f25b'
Conflicts:
	nixpkgs/nixos/modules/programs/ssh.nix
	nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix
	nixpkgs/pkgs/data/fonts/noto-fonts/default.nix
	nixpkgs/pkgs/development/go-modules/generic/default.nix
	nixpkgs/pkgs/development/interpreters/ruby/default.nix
	nixpkgs/pkgs/development/libraries/mesa/default.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/gis/grass/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/gis/grass/default.nix42
1 files changed, 28 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/applications/gis/grass/default.nix b/nixpkgs/pkgs/applications/gis/grass/default.nix
index 09c1fddbda21..5ca31cc04052 100644
--- a/nixpkgs/pkgs/applications/gis/grass/default.nix
+++ b/nixpkgs/pkgs/applications/gis/grass/default.nix
@@ -1,24 +1,29 @@
 { lib, stdenv, fetchFromGitHub, flex, bison, pkg-config, zlib, libtiff, libpng, fftw
-, cairo, readline, ffmpeg_3, makeWrapper, wxGTK30, netcdf, blas
-, proj, gdal, geos, sqlite, postgresql, libmysqlclient, python2Packages, libLAS, proj-datumgrid
+, cairo, readline, ffmpeg, makeWrapper, wxGTK30, wxmac, netcdf, blas
+, proj, gdal, geos, sqlite, postgresql, libmysqlclient, python3Packages, libLAS, proj-datumgrid
+, zstd, pdal, wrapGAppsHook
 }:
 
 stdenv.mkDerivation rec {
   name = "grass";
-  version = "7.6.1";
+  version = "7.8.6";
 
   src = with lib; fetchFromGitHub {
     owner = "OSGeo";
     repo = "grass";
-    rev = "${name}_${replaceStrings ["."] ["_"] version}";
-    sha256 = "1amjk9rz7vw5ha7nyl5j2bfwj5if9w62nlwx5qbp1x7spldimlll";
+    rev = version;
+    sha256 = "sha256-zvZqFWuxNyA+hu+NMiRbQVdzzrQPsZrdGdfVB17+SbM=";
   };
 
   nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo proj
-  readline ffmpeg_3 makeWrapper wxGTK30 netcdf geos postgresql libmysqlclient blas
-  libLAS proj-datumgrid ]
-    ++ (with python2Packages; [ python python-dateutil wxPython30 numpy ]);
+  buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite
+  readline ffmpeg makeWrapper netcdf geos postgresql libmysqlclient blas
+  libLAS proj-datumgrid zstd wrapGAppsHook ]
+    ++ lib.optionals stdenv.isLinux [ cairo pdal wxGTK30 ]
+    ++ lib.optional stdenv.isDarwin wxmac
+    ++ (with python3Packages; [ python python-dateutil numpy ]
+      ++ lib.optional stdenv.isDarwin wxPython_4_0
+      ++ lib.optional stdenv.isLinux wxPython_4_1);
 
   # On Darwin the installer tries to symlink the help files into a system
   # directory
@@ -32,7 +37,7 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--with-proj-share=${proj}/share/proj"
     "--with-proj-includes=${proj.dev}/include"
-    "--with-proj-lib=${proj}/lib"
+    "--with-proj-libs=${proj}/lib"
     "--without-opengl"
     "--with-readline"
     "--with-wxwidgets"
@@ -46,6 +51,15 @@ stdenv.mkDerivation rec {
     "--with-mysql-libs=${libmysqlclient}/lib/mysql"
     "--with-blas"
     "--with-liblas=${libLAS}/bin/liblas-config"
+    "--with-zstd"
+    "--with-fftw"
+    "--with-pthread"
+  ] ++ lib.optionals stdenv.isLinux [
+    "--with-pdal"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "--without-cairo"
+    "--without-freetype"
+    "--without-x"
   ];
 
   # Otherwise a very confusing "Can't load GDAL library" error
@@ -62,6 +76,7 @@ stdenv.mkDerivation rec {
       scripts/g.extension.all/g.extension.all.py \
       scripts/r.drain/r.drain.py \
       scripts/r.pack/r.pack.py \
+      scripts/r.import/r.import.py \
       scripts/r.tileset/r.tileset.py \
       scripts/r.unpack/r.unpack.py \
       scripts/v.clip/v.clip.py \
@@ -79,18 +94,17 @@ stdenv.mkDerivation rec {
       temporal/t.rast.algebra/t.rast.algebra.py \
       temporal/t.rast3d.algebra/t.rast3d.algebra.py \
       temporal/t.vect.algebra/t.vect.algebra.py \
+      temporal/t.downgrade/t.downgrade.py \
       temporal/t.select/t.select.py
     for d in gui lib scripts temporal tools; do
       patchShebangs $d
     done
   '';
 
-  NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1";
-
   postInstall = ''
-    wrapProgram $out/bin/grass76 \
+    wrapProgram $out/bin/grass78 \
     --set PYTHONPATH $PYTHONPATH \
-    --set GRASS_PYTHON ${python2Packages.python}/bin/${python2Packages.python.executable} \
+    --set GRASS_PYTHON ${python3Packages.python.interpreter} \
     --suffix LD_LIBRARY_PATH ':' '${gdal}/lib'
     ln -s $out/grass*/lib $out/lib
     ln -s $out/grass*/include $out/include