diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix index 8353bce1b84..d4e2043eaa7 100644 --- a/pkgs/applications/gis/grass/default.nix +++ b/pkgs/applications/gis/grass/default.nix @@ -35,6 +35,9 @@ stdenv.mkDerivation { "--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 = '' @@ -73,6 +76,7 @@ stdenv.mkDerivation { --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; @@ -82,5 +86,6 @@ stdenv.mkDerivation { 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]; }; } diff --git a/pkgs/applications/gis/qgis/default.nix b/pkgs/applications/gis/qgis/default.nix index 75f980c6781..896387b1f7f 100644 --- a/pkgs/applications/gis/qgis/default.nix +++ b/pkgs/applications/gis/qgis/default.nix @@ -1,7 +1,7 @@ { 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 +, withGrass ? true, grass, IOKit, ApplicationServices }: stdenv.mkDerivation rec { @@ -58,11 +58,13 @@ 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 @@ -75,6 +77,6 @@ stdenv.mkDerivation rec { homepage = http://www.qgis.org; license = stdenv.lib.licenses.gpl2Plus; platforms = with stdenv.lib.platforms; unix; - maintainers = with stdenv.lib.maintainers; [viric]; + maintainers = with stdenv.lib.maintainers; [viric mpickering]; }; }