tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
gdal: unbreak the python lib
Charles Strahan
11 years ago
1645795c
165456bb
+35
-1
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
gdal
default.nix
python.patch
+18
-1
pkgs/development/libraries/gdal/default.nix
···
13
13
14
14
buildInputs = [ unzip libjpeg libtiff libpng python pythonPackages.numpy proj openssl ];
15
15
16
16
+
patches = [
17
17
+
# This ensures that the python package is installed into gdal's prefix,
18
18
+
# rather than trying to install into python's prefix.
19
19
+
./python.patch
20
20
+
];
21
21
+
16
22
# Don't use optimization for gcc >= 4.3. That's said to be causing segfaults.
17
23
# Unset CC and CXX as they confuse libtool.
18
24
preConfigure = "export CFLAGS=-O0 CXXFLAGS=-O0; unset CC CXX";
···
31
37
"--with-geos=${geos}/bin/geos-config"# optional
32
38
];
33
39
40
40
+
# Prevent this:
41
41
+
#
42
42
+
# Checking .pth file support in /nix/store/xkrmb8xnvqxzjwsdmasqmsdh1a5y2y99-gdal-1.11.2/lib/python2.7/site-packages/
43
43
+
# /nix/store/pbi1lgank10fy0xpjckbdpgacqw34dsz-python-2.7.9/bin/python -E -c pass
44
44
+
# TEST FAILED: /nix/store/xkrmb8xnvqxzjwsdmasqmsdh1a5y2y99-gdal-1.11.2/lib/python2.7/site-packages/ does NOT support .pth files
45
45
+
# error: bad install directory or PYTHONPATH
46
46
+
preBuild = ''
47
47
+
pythonInstallDir=$out/lib/${python.libPrefix}/site-packages
48
48
+
mkdir -p $pythonInstallDir
49
49
+
export PYTHONPATH=''${PYTHONPATH:+''${PYTHONPATH}:}$pythonInstallDir
50
50
+
'';
51
51
+
34
52
meta = {
35
53
description = "Translator library for raster geospatial data formats";
36
54
homepage = http://www.gdal.org/;
37
55
license = stdenv.lib.licenses.mit;
38
56
maintainers = [ stdenv.lib.maintainers.marcweber ];
39
57
platforms = stdenv.lib.platforms.linux;
40
40
-
broken = true; # http://hydra.nixos.org/build/21344907/nixlog/1/raw
41
58
};
42
59
})
+17
pkgs/development/libraries/gdal/python.patch
···
1
1
+
diff --git a/swig/python/GNUmakefile.old b/swig/python/GNUmakefile
2
2
+
index b4d5e90..2160b83 100644
3
3
+
--- a/swig/python/GNUmakefile
4
4
+
+++ b/swig/python/GNUmakefile
5
5
+
@@ -67,11 +67,7 @@ egg:
6
6
+
7
7
+
install:
8
8
+
9
9
+
-ifeq ($(PY_HAVE_SETUPTOOLS),1)
10
10
+
- $(PYTHON) setup.py install
11
11
+
-else
12
12
+
$(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
13
13
+
-endif
14
14
+
15
15
+
for f in $(SCRIPTS) ; do $(INSTALL) ./scripts/$$f $(DESTDIR)$(INST_BIN) ; done
16
16
+
17
17
+