diff options
Diffstat (limited to 'pkgs/applications/gis/grass/default.nix')
-rw-r--r-- | pkgs/applications/gis/grass/default.nix | 59 |
1 files changed, 37 insertions, 22 deletions
diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix index 4eb10a34d2e24..fd26e49fdbd88 100644 --- a/pkgs/applications/gis/grass/default.nix +++ b/pkgs/applications/gis/grass/default.nix @@ -5,17 +5,22 @@ , makeWrapper , wrapGAppsHook3 +, withOpenGL ? true + , bison , blas , cairo , ffmpeg , fftw , flex +, freetype , gdal , geos +, lapack +, libGLU , libiconv -, libmysqlclient , libpng +, libsvm , libtiff , libxml2 , netcdf @@ -23,7 +28,7 @@ , pkg-config , postgresql , proj -, python3Packages +, python311Packages , readline , sqlite , wxGTK32 @@ -31,15 +36,19 @@ , zstd }: +let + pyPackages = python311Packages; + +in stdenv.mkDerivation (finalAttrs: { pname = "grass"; - version = "8.3.2"; + version = "8.4.0"; src = fetchFromGitHub { owner = "OSGeo"; repo = "grass"; rev = finalAttrs.version; - hash = "sha256-loeg+7h676d2WdYOMcJFyzeEZcxjBynir6Hz0J/GBns="; + hash = "sha256-NKMshd6pr2O62ZjmQ/oPttmeVBYVD0Nqhh3SwQrhZf8="; }; nativeBuildInputs = [ @@ -50,22 +59,23 @@ stdenv.mkDerivation (finalAttrs: { flex gdal # for `gdal-config` geos # for `geos-config` - libmysqlclient # for `mysql_config` netcdf # for `nc-config` pkg-config - ] ++ (with python3Packages; [ python-dateutil numpy wxpython ]); + ] ++ (with pyPackages; [ python-dateutil numpy wxpython ]); buildInputs = [ blas cairo ffmpeg fftw + freetype gdal geos - libmysqlclient + lapack libpng + libsvm libtiff - libxml2 + (libxml2.override { enableHttp = true; }) netcdf pdal postgresql @@ -75,7 +85,8 @@ stdenv.mkDerivation (finalAttrs: { wxGTK32 zlib zstd - ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + ] ++ lib.optionals withOpenGL [ libGLU ] + ++ lib.optionals stdenv.isDarwin [ libiconv ]; strictDeps = true; @@ -84,26 +95,30 @@ stdenv.mkDerivation (finalAttrs: { ./clang-integer-conversion.patch ]; - # Correct mysql_config query - postPatch = '' - substituteInPlace configure --replace "--libmysqld-libs" "--libs" - ''; - configureFlags = [ "--with-blas" + "--with-cairo-ldflags=-lfontconfig" + "--with-cxx" + "--with-fftw" + "--with-freetype" "--with-geos" - # It complains about missing libmysqld but doesn't really seem to need it - "--with-mysql" - "--with-mysql-includes=${lib.getDev libmysqlclient}/include/mysql" - "--with-mysql-libs=${libmysqlclient}/lib/mysql" - "--with-netcdf" + "--with-gdal" + "--with-lapack" + "--with-libsvm" + "--with-nls" + "--with-openmp" + "--with-pdal" "--with-postgres" "--with-postgres-libs=${postgresql.lib}/lib/" "--with-proj-includes=${proj.dev}/include" "--with-proj-libs=${proj}/lib" "--with-proj-share=${proj}/share/proj" - "--with-pthread" - "--with-readline" + "--with-sqlite" + "--with-zstd" + "--without-bzlib" + "--without-mysql" + "--without-odbc" + ] ++ lib.optionals (! withOpenGL) [ "--without-opengl" ] ++ lib.optionals stdenv.isDarwin [ "--without-cairo" @@ -127,7 +142,7 @@ stdenv.mkDerivation (finalAttrs: { postInstall = '' wrapProgram $out/bin/grass \ --set PYTHONPATH $PYTHONPATH \ - --set GRASS_PYTHON ${python3Packages.python.interpreter} \ + --set GRASS_PYTHON ${pyPackages.python.interpreter} \ --suffix LD_LIBRARY_PATH ':' '${gdal}/lib' ln -s $out/grass*/lib $out/lib ln -s $out/grass*/include $out/include |