git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #9423 from vbgl/gdal

gdal: fix standalone python programs (fixes #9386)

commit83fe2a4bfa9f77dd8a017ba3f066203d5c9a7a93 authorvbgl <vbgl@users.noreply.github.com> dateThu 10 Sep 2015, 19:37 (11 years ago) parent2cc86804501d4f
1 file changed+8−3
pkgs/development/libraries/gdal/default.nix+8−3
pkgs/development/libraries/gdal/default.nix+8−3
@@ -1,5 +1,5 @@
11{ stdenv, fetchurl, composableDerivation, unzip, libjpeg, libtiff, zlib
2−, postgresql, mysql, libgeotiff, python, pythonPackages, proj, geos, openssl
2+, postgresql, mysql, libgeotiff, pythonPackages, proj, geos, openssl
33, libpng }:
44
55composableDerivation.composableDerivation {} (fixed: rec {
@@ -11,7 +11,8 @@ composableDerivation.composableDerivation {} (fixed: rec {
1111 sha256 = "53761563ff53c5bf27bff7c4d6cab8bb1634baccefda05348e0f3b7acaf4c9e6";
1212 };
1313
14− buildInputs = [ unzip libjpeg libtiff libpng python pythonPackages.numpy proj openssl ];
14+ buildInputs = [ unzip libjpeg libtiff libpng proj openssl ]
15+ ++ (with pythonPackages; [ python numpy wrapPython ]);
1516
1617 patches = [
1718 # This ensures that the python package is installed into gdal's prefix,
@@ -44,11 +45,15 @@ composableDerivation.composableDerivation {} (fixed: rec {
4445 # TEST FAILED: /nix/store/xkrmb8xnvqxzjwsdmasqmsdh1a5y2y99-gdal-1.11.2/lib/python2.7/site-packages/ does NOT support .pth files
4546 # error: bad install directory or PYTHONPATH
4647 preBuild = ''
47− pythonInstallDir=$out/lib/${python.libPrefix}/site-packages
48+ pythonInstallDir=$out/lib/${pythonPackages.python.libPrefix}/site-packages
4849 mkdir -p $pythonInstallDir
4950 export PYTHONPATH=''${PYTHONPATH:+''${PYTHONPATH}:}$pythonInstallDir
5051 '';
5152
53+ postInstall = ''
54+ wrapPythonPrograms
55+ '';
56+
5257 meta = {
5358 description = "Translator library for raster geospatial data formats";
5459 homepage = http://www.gdal.org/;