@ -1,4 +1,4 @@
{ lib , stdenv , fetchFromGitHub , cmake , boost , gmp , mpfr }:
{ lib , stdenv , fetchFromGitHub , fetchpatch , cmake , boost , gmp , mpfr }:
stdenv . mkDerivation rec {
version = " 4 . 1 4 . 2 " ;
@ -11,6 +11,28 @@ stdenv.mkDerivation rec {
sha256 = " 1 p 1 x y w s 2 s 9 h 2 c 8 h l k z 1 a f 4 i x 4 8 q m a 1 6 0 a v 2 4 b y 6 l c m 8 a l 1 g 4 4 p c a " ;
} ;
patches = [
# Pull upstream fix for c++17 (gcc-12):
# https://github.com/CGAL/cgal/pull/6109
( fetchpatch {
name = " g c c - 1 2 - p r e r e q . p a t c h " ;
url = " h t t p s : / / g i t h u b . c o m / C G A L / c g a l / c o m m i t / 4 5 8 1 f 1 b 7 a 8 e 9 7 d 1 a 1 3 6 8 3 0 e 6 4 b 7 7 c d a e 3 5 4 6 c 4 b f . p a t c h " ;
sha256 = " 1 g z r v b r w x y l v 8 0 v 0 m 3 j 2 s 1 z n l y s m r 6 9 l p 3 g g a g n h 3 8 l p 6 4 2 3 i 6 p q " ;
# Upstream slightly reordered directory structure since.
stripLen = 1 ;
# Fill patch does not apply: touches too many parts of the source.
includes = [ " i n c l u d e / C G A L / C O R E / B i g F l o a t R e p . h " ] ;
} )
( fetchpatch {
name = " g c c - 1 2 . p a t c h " ;
url = " h t t p s : / / g i t h u b . c o m / C G A L / c g a l / c o m m i t / 6 6 8 0 a 6 e 6 f 9 9 4 b 2 c 5 b 9 f 0 6 8 e b 3 0 1 4 d 1 2 e e 1 1 3 4 d 5 3 . p a t c h " ;
sha256 = " 1 c 0 h 1 l h 8 z n g 6 0 y x 7 8 q c 8 w x 7 1 4 b 5 1 7 m i l 8 m a c 8 7 v 6 x r 2 1 q 0 b 1 1 w k 7 " ;
# Upstream slightly reordered directory structure since.
stripLen = 1 ;
} )
] ;
# note: optional component libCGAL_ImageIO would need zlib and opengl;
# there are also libCGAL_Qt{3,4} omitted ATM
buildInputs = [ boost gmp mpfr ] ;