lol
1{stdenv, fetchurl, mesa, tcl, tk, file, libXmu, automake, autoconf, libtool, qt4,
2ftgl, freetype}:
3
4stdenv.mkDerivation rec {
5 name = "opencascade-6.5.5";
6 src = fetchurl {
7 url = http://files.opencascade.com/OCCT/OCC_6.5.5_release/OpenCASCADE655.tgz;
8 sha256 = "1dnik00adfh6dxvn9kgf35yjda8chbi05f71i9119idmmrcapipm";
9 };
10
11 buildInputs = [ mesa tcl tk file libXmu automake autoconf libtool qt4 ftgl freetype ];
12
13 preUnpack = ''
14 sourceRoot=`pwd`/ros
15 '';
16
17 preConfigure = ''
18 sh ./build_configure
19 '';
20
21 # -fpermissive helps building opencascade, although gcc detects a flaw in the code
22 # and reports an error otherwise. Further versions may fix that.
23 NIX_CFLAGS_COMPILE = "-fpermissive"
24 # https://bugzilla.redhat.com/show_bug.cgi?id=902561
25 + " -DUSE_INTERP_RESULT"
26 # https://bugs.freedesktop.org/show_bug.cgi?id=83631
27 + " -DGLX_GLXEXT_LEGACY";
28
29 hardeningDisable = [ "format" ];
30
31 configureFlags = [ "--with-tcl=${tcl}/lib" "--with-tk=${tk}/lib" "--with-qt=${qt4}" "--with-ftgl=${ftgl}" "--with-freetype=${freetype.dev}" ];
32
33 postInstall = ''
34 mv $out/inc $out/include
35 mkdir -p $out/share/doc/${name}
36 cp -R ../doc $out/share/doc/${name}
37 '';
38
39 enableParallelBuilding = true;
40
41 meta = {
42 description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation";
43 homepage = http://www.opencascade.org/;
44 maintainers = with stdenv.lib.maintainers; [viric];
45 platforms = with stdenv.lib.platforms; linux;
46 };
47}