2021-12-30 13:39:12 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, gmp, mpfr }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "4.14.2";
|
2022-03-10 19:12:11 +00:00
|
|
|
pname = "cgal";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CGAL";
|
|
|
|
repo = "releases";
|
|
|
|
rev = "CGAL-${version}";
|
|
|
|
sha256 = "1p1xyws2s9h2c8hlkz1af4ix48qma160av24by6lcm8al1g44pca";
|
|
|
|
};
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
patches = [
|
2023-02-02 18:25:31 +00:00
|
|
|
./cgal_path.patch
|
2021-12-30 13:39:12 +00:00
|
|
|
|
|
|
|
# Pull upstream fix for c++17 (gcc-12):
|
|
|
|
# https://github.com/CGAL/cgal/pull/6109
|
|
|
|
(fetchpatch {
|
|
|
|
name = "gcc-12-prereq.patch";
|
|
|
|
url = "https://github.com/CGAL/cgal/commit/4581f1b7a8e97d1a136830e64b77cdae3546c4bf.patch";
|
2022-03-30 09:31:56 +00:00
|
|
|
relative = "CGAL_Core"; # Upstream slightly reordered directory structure since.
|
|
|
|
sha256 = "sha256-4+7mzGSBwAv5RHBQPAecPPKNN/LQBgvYq5mq+fHAteo=";
|
2021-12-30 13:39:12 +00:00
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "gcc-12.patch";
|
|
|
|
url = "https://github.com/CGAL/cgal/commit/6680a6e6f994b2c5b9f068eb3014d12ee1134d53.patch";
|
2022-03-30 09:31:56 +00:00
|
|
|
relative = "CGAL_Core"; # Upstream slightly reordered directory structure since.
|
|
|
|
sha256 = "sha256-8kxJDT47jXI9kQNFI/ARWl9JBNS4AfU57/D0tYlgW0M=";
|
2021-12-30 13:39:12 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# note: optional component libCGAL_ImageIO would need zlib and opengl;
|
|
|
|
# there are also libCGAL_Qt{3,4} omitted ATM
|
|
|
|
buildInputs = [ boost gmp mpfr ];
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Computational Geometry Algorithms Library";
|
|
|
|
homepage = "http://cgal.org";
|
|
|
|
license = with licenses; [ gpl3Plus lgpl3Plus];
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
};
|
|
|
|
}
|