diff options
Diffstat (limited to 'pkgs/development/libraries/gdal/default.nix')
-rw-r--r-- | pkgs/development/libraries/gdal/default.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix index 237b5537ba4..fe7d0869fbd 100644 --- a/pkgs/development/libraries/gdal/default.nix +++ b/pkgs/development/libraries/gdal/default.nix @@ -13,6 +13,12 @@ composableDerivation.composableDerivation {} (fixed: rec { buildInputs = [ unzip libjpeg libtiff libpng python pythonPackages.numpy proj openssl ]; + patches = [ + # This ensures that the python package is installed into gdal's prefix, + # rather than trying to install into python's prefix. + ./python.patch + ]; + # Don't use optimization for gcc >= 4.3. That's said to be causing segfaults. # Unset CC and CXX as they confuse libtool. preConfigure = "export CFLAGS=-O0 CXXFLAGS=-O0; unset CC CXX"; @@ -31,6 +37,18 @@ composableDerivation.composableDerivation {} (fixed: rec { "--with-geos=${geos}/bin/geos-config"# optional ]; + # Prevent this: + # + # Checking .pth file support in /nix/store/xkrmb8xnvqxzjwsdmasqmsdh1a5y2y99-gdal-1.11.2/lib/python2.7/site-packages/ + # /nix/store/pbi1lgank10fy0xpjckbdpgacqw34dsz-python-2.7.9/bin/python -E -c pass + # TEST FAILED: /nix/store/xkrmb8xnvqxzjwsdmasqmsdh1a5y2y99-gdal-1.11.2/lib/python2.7/site-packages/ does NOT support .pth files + # error: bad install directory or PYTHONPATH + preBuild = '' + pythonInstallDir=$out/lib/${python.libPrefix}/site-packages + mkdir -p $pythonInstallDir + export PYTHONPATH=''${PYTHONPATH:+''${PYTHONPATH}:}$pythonInstallDir + ''; + meta = { description = "Translator library for raster geospatial data formats"; homepage = http://www.gdal.org/; |