aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/qhull
diff options
context:
space:
mode:
authorAnthony Cowley <acowley@gmail.com>2016-04-01 14:06:14 -0400
committerAnthony Cowley <acowley@gmail.com>2016-04-01 14:06:14 -0400
commitc97ccd388c5bdcd1b581312408dc17222246f4cf (patch)
tree94e71f6abbd6f4da2da18a3deca9856b6e934668 /pkgs/development/libraries/qhull
parent0660ff562581a813cbc8fb108e9908b1203029b2 (diff)
qhull: darwin compatibility
The hand-rolled iterator declaration is incompatible with libc++'s, and clang > 3.5 is stricter about this. See <https://lists.freebsd.org/pipermail/freebsd-ports-bugs/2014-December/298242.html> for another reference to this issue. The errors that occur are of the form: reference to 'random_access_iterator_tag' is ambiguous
Diffstat (limited to 'pkgs/development/libraries/qhull')
-rw-r--r--pkgs/development/libraries/qhull/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qhull/default.nix b/pkgs/development/libraries/qhull/default.nix
index 76ceb12b401f..f98c7bdb97e4 100644
--- a/pkgs/development/libraries/qhull/default.nix
+++ b/pkgs/development/libraries/qhull/default.nix
@@ -12,6 +12,11 @@ stdenv.mkDerivation rec {
cmakeFlags = "-DMAN_INSTALL_DIR=share/man/man1 -DDOC_INSTALL_DIR=share/doc/qhull";
+ patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
+ sed -i 's/namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; }/#include <iterator>/' ./src/libqhullcpp/QhullIterator.h
+ sed -i 's/namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; }/#include <iterator>/' ./src/libqhullcpp/QhullLinkedList.h
+ '';
+
meta = {
homepage = http://www.qhull.org/;
description = "Computes the convex hull, Delaunay triangulation, Voronoi diagram and more";