diff options
Diffstat (limited to 'pkgs/applications/gis/grass/default.nix')
-rw-r--r-- | pkgs/applications/gis/grass/default.nix | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix index 09c1fddbda21e..5ca31cc040528 100644 --- a/pkgs/applications/gis/grass/default.nix +++ b/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 |