Merge: zmap: 4.2.0 -> 4.3.1 (#364578)
[NixPkgs.git] / pkgs / development / libraries / CGAL / 4.nix
blob5d6ca6e89fbe7189f504c23eed3f54cbb673df67
2   lib,
3   stdenv,
4   fetchurl,
5   fetchpatch,
6   cmake,
7   boost,
8   gmp,
9   mpfr,
12 stdenv.mkDerivation rec {
13   version = "4.14.3";
14   pname = "cgal";
16   src = fetchurl {
17     url = "https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-${version}/CGAL-${version}.tar.xz";
18     hash = "sha256-W6/nq+hDW+yhehCCBi02M2jsHj8NZYG7DaiwEPs4n+Q=";
19   };
21   patches = [
22     ./cgal_path.patch
24     # Pull upstream fix for c++17 (gcc-12):
25     #  https://github.com/CGAL/cgal/pull/6109
26     (fetchpatch {
27       name = "gcc-12-prereq.patch";
28       url = "https://github.com/CGAL/cgal/commit/4581f1b7a8e97d1a136830e64b77cdae3546c4bf.patch";
29       relative = "CGAL_Core"; # Upstream slightly reordered directory structure since.
30       sha256 = "sha256-4+7mzGSBwAv5RHBQPAecPPKNN/LQBgvYq5mq+fHAteo=";
31     })
32     (fetchpatch {
33       name = "gcc-12.patch";
34       url = "https://github.com/CGAL/cgal/commit/6680a6e6f994b2c5b9f068eb3014d12ee1134d53.patch";
35       relative = "CGAL_Core"; # Upstream slightly reordered directory structure since.
36       sha256 = "sha256-8kxJDT47jXI9kQNFI/ARWl9JBNS4AfU57/D0tYlgW0M=";
37     })
38   ];
40   # note: optional component libCGAL_ImageIO would need zlib and opengl;
41   #   there are also libCGAL_Qt{3,4} omitted ATM
42   buildInputs = [
43     boost
44     gmp
45     mpfr
46   ];
47   nativeBuildInputs = [ cmake ];
49   doCheck = false;
51   meta = with lib; {
52     description = "Computational Geometry Algorithms Library";
53     homepage = "http://cgal.org";
54     license = with licenses; [
55       gpl3Plus
56       lgpl3Plus
57     ];
58     platforms = platforms.all;
59     maintainers = [ maintainers.raskin ];
60   };