3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/gdal/default.nix
Benjamin Staffin b3d33d398c gdal: fix the build
Commit 28b6fb61e6 added explicit CC and
CXX assignments in pkgs/build-support/gcc-wrapper/setup-hook.sh.
That breaks the gdal python extension build somehow, presumably by
confusing libtool.

This appears to revert gdal to building with g++ and gcc (on linux at
least), but at least it builds this way.

Change-Id: I83fb78daa9314dc60c4f635d3f1e937a90349b8a
2015-01-13 23:46:26 -08:00

39 lines
1.3 KiB
Nix

{ stdenv, fetchurl, composableDerivation, unzip, libjpeg, libtiff, zlib
, postgresql, mysql, libgeotiff, python, pythonPackages, proj}:
composableDerivation.composableDerivation {} (fixed: rec {
version = "1.11.1";
name = "gdal-${version}";
src = fetchurl {
url = "http://download.osgeo.org/gdal/${version}/${name}.tar.gz";
sha256 = "0h1kib2pzv4nbppdnxv6vhngvk9ic531y8rzcwb8bg6am125jszl";
};
buildInputs = [ unzip libjpeg libtiff python pythonPackages.numpy proj ];
# 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";
configureFlags = [
"--with-jpeg=${libjpeg}"
"--with-libtiff=${libtiff}" # optional (without largetiff support)
"--with-libz=${zlib}" # optional
"--with-pg=${postgresql}/bin/pg_config"
"--with-mysql=${mysql}/bin/mysql_config"
"--with-geotiff=${libgeotiff}"
"--with-python" # optional
"--with-static-proj4=${proj}" # optional
];
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;
};
})