grass: pin to python 3.11

Pin to Python 3.11 since wxpython is not yet compatible to Python 3.12.

Co-authored-by: Ivan Mincik <ivan.mincik@gmail.com>
This commit is contained in:
Franz Pletz 2024-07-09 05:58:35 +02:00
parent 1c2d0491c5
commit 1e0e33c132
No known key found for this signature in database
GPG Key ID: 846FDED7792617B4

View File

@ -23,7 +23,7 @@
, pkg-config
, postgresql
, proj
, python3Packages
, python311Packages
, readline
, sqlite
, wxGTK32
@ -31,6 +31,9 @@
, zstd
}:
let
pyPackages = python311Packages;
in
stdenv.mkDerivation (finalAttrs: {
pname = "grass";
version = "8.3.2";
@ -53,7 +56,7 @@ stdenv.mkDerivation (finalAttrs: {
libmysqlclient # for `mysql_config`
netcdf # for `nc-config`
pkg-config
] ++ (with python3Packages; [ python-dateutil numpy wxpython ]);
] ++ (with pyPackages; [ python-dateutil numpy wxpython ]);
buildInputs = [
blas
@ -86,7 +89,7 @@ stdenv.mkDerivation (finalAttrs: {
# Correct mysql_config query
postPatch = ''
substituteInPlace configure --replace "--libmysqld-libs" "--libs"
substituteInPlace configure --replace "--libmysqld-libs" "--libs"
'';
configureFlags = [
@ -127,7 +130,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