From c97ccd388c5bdcd1b581312408dc17222246f4cf Mon Sep 17 00:00:00 2001 From: Anthony Cowley Date: Fri, 1 Apr 2016 14:06:14 -0400 Subject: [PATCH] qhull: darwin compatibility The hand-rolled iterator declaration is incompatible with libc++'s, and clang > 3.5 is stricter about this. See for another reference to this issue. The errors that occur are of the form: reference to 'random_access_iterator_tag' is ambiguous --- pkgs/development/libraries/qhull/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/qhull/default.nix b/pkgs/development/libraries/qhull/default.nix index 76ceb12b401..f98c7bdb97e 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 /' ./src/libqhullcpp/QhullIterator.h + sed -i 's/namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; }/#include /' ./src/libqhullcpp/QhullLinkedList.h + ''; + meta = { homepage = http://www.qhull.org/; description = "Computes the convex hull, Delaunay triangulation, Voronoi diagram and more";