Merge pull request #38916 from mpickering/qgis-darwin-pr

QGIS and GRASS fixes

Changed files
+9 -2
pkgs
applications
gis
+5
pkgs/applications/gis/grass/default.nix
···
"--with-blas"
];
/* Ensures that the python script run at build time are actually executable;
* otherwise, patchShebangs ignores them. */
postConfigure = ''
···
--set GRASS_PYTHON ${python2Packages.python}/bin/${python2Packages.python.executable} \
--suffix LD_LIBRARY_PATH ':' '${gdal}/lib'
ln -s $out/grass-*/lib $out/lib
'';
enableParallelBuilding = true;
···
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;
};
}
···
"--with-blas"
];
+
# Otherwise a very confusing "Can't load GDAL library" error
+
makeFlags = stdenv.lib.optional stdenv.isDarwin "GDAL_DYNAMIC=";
+
/* Ensures that the python script run at build time are actually executable;
* otherwise, patchShebangs ignores them. */
postConfigure = ''
···
--set GRASS_PYTHON ${python2Packages.python}/bin/${python2Packages.python.executable} \
--suffix LD_LIBRARY_PATH ':' '${gdal}/lib'
ln -s $out/grass-*/lib $out/lib
+
ln -s $out/grass-*/include $out/include
'';
enableParallelBuilding = true;
···
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;
+
maintainers = with stdenv.lib.maintainers; [mpickering];
};
}
+4 -2
pkgs/applications/gis/qgis/default.nix
···
{ stdenv, fetchurl, fetchpatch, gdal, cmake, qt4, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl
, qwt, fcgi, python2Packages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper
, qjson, qca2, txt2tags, openssl, darwin, pkgconfig
-
, withGrass ? false, grass, IOKit, ApplicationServices
}:
stdenv.mkDerivation rec {
···
'') +
(stdenv.lib.optionalString stdenv.isDarwin ''
# Necessary for QGIS to find the correct default GRASS path
${stdenv.lib.optionalString withGrass "ln -sf ${grass} $out/QGIS.app/Contents/MacOS/grass"}
for file in $(find $out -type f -name "QGIS"); do
wrapProgram "$file" \
--prefix DYLD_LIBRARY_PATH : "${qwt}/lib" \
--prefix DYLD_LIBRARY_PATH : "${qscintilla}/lib" \
${stdenv.lib.optionalString withGrass "--prefix PATH : ${grass}/bin"} \
--set PYTHONPATH $PYTHONPATH
done
···
homepage = http://www.qgis.org;
license = stdenv.lib.licenses.gpl2Plus;
platforms = with stdenv.lib.platforms; unix;
-
maintainers = with stdenv.lib.maintainers; [viric];
};
}
···
{ stdenv, fetchurl, fetchpatch, gdal, cmake, qt4, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl
, qwt, fcgi, python2Packages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper
, qjson, qca2, txt2tags, openssl, darwin, pkgconfig
+
, withGrass ? true, grass, IOKit, ApplicationServices
}:
stdenv.mkDerivation rec {
···
'') +
(stdenv.lib.optionalString stdenv.isDarwin ''
# Necessary for QGIS to find the correct default GRASS path
+
# Plugins look for gdal tools like deminfo on the PATH
${stdenv.lib.optionalString withGrass "ln -sf ${grass} $out/QGIS.app/Contents/MacOS/grass"}
for file in $(find $out -type f -name "QGIS"); do
wrapProgram "$file" \
--prefix DYLD_LIBRARY_PATH : "${qwt}/lib" \
--prefix DYLD_LIBRARY_PATH : "${qscintilla}/lib" \
+
--prefix PATH : "${gdal}/bin" \
${stdenv.lib.optionalString withGrass "--prefix PATH : ${grass}/bin"} \
--set PYTHONPATH $PYTHONPATH
done
···
homepage = http://www.qgis.org;
license = stdenv.lib.licenses.gpl2Plus;
platforms = with stdenv.lib.platforms; unix;
+
maintainers = with stdenv.lib.maintainers; [viric mpickering];
};
}