1 { lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, gmp, mpfr }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
10 rev = "CGAL-${version}";
11 sha256 = "1p1xyws2s9h2c8hlkz1af4ix48qma160av24by6lcm8al1g44pca";
17 # Pull upstream fix for c++17 (gcc-12):
18 # https://github.com/CGAL/cgal/pull/6109
20 name = "gcc-12-prereq.patch";
21 url = "https://github.com/CGAL/cgal/commit/4581f1b7a8e97d1a136830e64b77cdae3546c4bf.patch";
22 relative = "CGAL_Core"; # Upstream slightly reordered directory structure since.
23 sha256 = "sha256-4+7mzGSBwAv5RHBQPAecPPKNN/LQBgvYq5mq+fHAteo=";
26 name = "gcc-12.patch";
27 url = "https://github.com/CGAL/cgal/commit/6680a6e6f994b2c5b9f068eb3014d12ee1134d53.patch";
28 relative = "CGAL_Core"; # Upstream slightly reordered directory structure since.
29 sha256 = "sha256-8kxJDT47jXI9kQNFI/ARWl9JBNS4AfU57/D0tYlgW0M=";
33 # note: optional component libCGAL_ImageIO would need zlib and opengl;
34 # there are also libCGAL_Qt{3,4} omitted ATM
35 buildInputs = [ boost gmp mpfr ];
36 nativeBuildInputs = [ cmake ];
41 description = "Computational Geometry Algorithms Library";
42 homepage = "http://cgal.org";
43 license = with licenses; [ gpl3Plus lgpl3Plus];
44 platforms = platforms.all;
45 maintainers = [ maintainers.raskin ];