@@ -13,6 +13,12 @@ composableDerivation.composableDerivation {} (fixed: rec {
1313
1414 buildInputs = [ unzip libjpeg libtiff libpng python pythonPackages.numpy proj openssl ];
1515
16+ patches = [
17+ # This ensures that the python package is installed into gdal's prefix,
18+ # rather than trying to install into python's prefix.
19+ ./python.patch
20+ ];
21+
1622 # Don't use optimization for gcc >= 4.3. That's said to be causing segfaults.
1723 # Unset CC and CXX as they confuse libtool.
1824 preConfigure = "export CFLAGS=-O0 CXXFLAGS=-O0; unset CC CXX";
@@ -31,12 +37,23 @@ composableDerivation.composableDerivation {} (fixed: rec {
3137 "--with-geos=${geos}/bin/geos-config"# optional
3238 ];
3339
40+ # Prevent this:
41+ #
42+ # Checking .pth file support in /nix/store/xkrmb8xnvqxzjwsdmasqmsdh1a5y2y99-gdal-1.11.2/lib/python2.7/site-packages/
43+ # /nix/store/pbi1lgank10fy0xpjckbdpgacqw34dsz-python-2.7.9/bin/python -E -c pass
44+ # TEST FAILED: /nix/store/xkrmb8xnvqxzjwsdmasqmsdh1a5y2y99-gdal-1.11.2/lib/python2.7/site-packages/ does NOT support .pth files
45+ # error: bad install directory or PYTHONPATH
46+ preBuild = ''
47+ pythonInstallDir=$out/lib/${python.libPrefix}/site-packages
48+ mkdir -p $pythonInstallDir
49+ export PYTHONPATH=''${PYTHONPATH:+''${PYTHONPATH}:}$pythonInstallDir
50+ '';
51+
3452 meta = {
3553 description = "Translator library for raster geospatial data formats";
3654 homepage = http://www.gdal.org/;
3755 license = stdenv.lib.licenses.mit;
3856 maintainers = [ stdenv.lib.maintainers.marcweber ];
3957 platforms = stdenv.lib.platforms.linux;
40− broken = true; # http://hydra.nixos.org/build/21344907/nixlog/1/raw
4158 };
4259})