1{stdenv, fetchurl, libGLU_combined, tcl, tk, file, libXmu, cmake, libtool, qt4,
2ftgl, freetype}:
3
4stdenv.mkDerivation rec {
5 name = "opencascade-oce-0.17.2";
6 src = fetchurl {
7 url = https://github.com/tpaviot/oce/archive/OCE-0.17.2.tar.gz;
8 sha256 = "0vpmnb0k5y2f7lpmwx9pg9yfq24zjvnsak5alzacncfm1hv9b6cd";
9 };
10
11 buildInputs = [ libGLU_combined tcl tk file libXmu libtool qt4 ftgl freetype cmake ];
12
13 # Fix for glibc 2.26
14 postPatch = ''
15 sed -i -e 's/^\( *#include <\)x\(locale.h>\)//' \
16 src/Standard/Standard_CLocaleSentry.hxx
17 '';
18
19 preConfigure = ''
20 cmakeFlags="$cmakeFlags -DOCE_INSTALL_PREFIX=$out"
21 '';
22
23 # https://bugs.freedesktop.org/show_bug.cgi?id=83631
24 NIX_CFLAGS_COMPILE = "-DGLX_GLXEXT_LEGACY";
25
26 enableParallelBuilding = true;
27
28 meta = {
29 description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation";
30 homepage = http://www.opencascade.org/;
31 maintainers = with stdenv.lib.maintainers; [viric];
32 platforms = with stdenv.lib.platforms; linux;
33 };
34}