From 1645795c53807a83561479eebf25bb1adce003ce Mon Sep 17 00:00:00 2001 From: Charles Strahan Date: Sat, 18 Apr 2015 17:31:09 -0400 Subject: gdal: unbreak the python lib --- pkgs/development/libraries/gdal/default.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'pkgs/development/libraries/gdal/default.nix') diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix index f6a49d61f6d..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,12 +37,23 @@ 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/; license = stdenv.lib.licenses.mit; maintainers = [ stdenv.lib.maintainers.marcweber ]; platforms = stdenv.lib.platforms.linux; - broken = true; # http://hydra.nixos.org/build/21344907/nixlog/1/raw }; }) -- cgit 1.4.1