2011-08-15 22:05:10 +04:00
|
|
|
{stdenv, fetchurl, cmake}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2012-02-05 13:26:15 +04:00
|
|
|
name = "qhull-2012.1";
|
2009-04-09 00:06:03 +04:00
|
|
|
|
|
|
|
src = fetchurl {
|
2011-08-15 22:05:10 +04:00
|
|
|
url = "${meta.homepage}/download/${name}-src.tgz";
|
2012-04-21 08:21:25 +04:00
|
|
|
sha256 = "127zpjp6sm8c101hz239k82lpxqcqf4ksdyfqc2py2sm22kclpm3";
|
2009-04-09 00:06:03 +04:00
|
|
|
};
|
|
|
|
|
2012-12-28 22:20:09 +04:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2009-04-09 00:06:03 +04:00
|
|
|
|
2011-08-15 22:05:10 +04:00
|
|
|
cmakeFlags = "-DMAN_INSTALL_DIR=share/man/man1 -DDOC_INSTALL_DIR=share/doc/qhull";
|
2009-04-09 00:06:03 +04:00
|
|
|
|
2016-02-26 20:38:15 +03:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-12 17:04:24 +03:00
|
|
|
|
2016-04-01 21:06:14 +03:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2009-04-09 00:06:03 +04:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.qhull.org/;
|
2013-10-06 13:49:53 +04:00
|
|
|
description = "Computes the convex hull, Delaunay triangulation, Voronoi diagram and more";
|
2014-11-06 03:44:33 +03:00
|
|
|
license = stdenv.lib.licenses.free;
|
2016-08-02 20:50:55 +03:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2009-04-09 00:06:03 +04:00
|
|
|
};
|
|
|
|
}
|