1{ lib, stdenv, fetchFromGitHub, cmake, fixDarwinDylibNames }:
2
3stdenv.mkDerivation rec {
4 pname = "qhull";
5 version = "2020.2";
6
7 src = fetchFromGitHub {
8 owner = "qhull";
9 repo = "qhull";
10 rev = version;
11 sha256 = "sha256-djUO3qzY8ch29AuhY3Bn1ajxWZ4/W70icWVrxWRAxRc=";
12 };
13
14 nativeBuildInputs = [ cmake ]
15 ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
16
17 meta = with lib; {
18 homepage = "http://www.qhull.org/";
19 description = "Compute the convex hull, Delaunay triangulation, Voronoi diagram and more";
20 license = licenses.qhull;
21 platforms = platforms.unix;
22 maintainers = with maintainers; [ orivej ];
23 };
24}