summary refs log tree commit diff
path: root/pkgs/development/libraries/opencascade/6.5.nix
blob: a150f53bb860a816070a776165b47a621eb92b23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{stdenv, fetchurl, mesa, tcl, tk, file, libXmu, automake, autoconf, libtool, qt4,
ftgl, freetype}:

stdenv.mkDerivation rec {
  name = "opencascade-6.5.4";
  src = fetchurl {
    url = http://files.opencascade.com/OCCT/OCC_6.5.4_release/OpenCASCADE654.tar.gz;
    sha256 = "1di08mc0wly4cdi3rh9kj52bk0bfpyk6dy03c9yfnv04i7z03kmy";
  };

  buildInputs = [ mesa tcl tk file libXmu automake autoconf libtool qt4 ftgl freetype ];

  preUnpack = ''
    sourceRoot=`pwd`/ros
  '';

  preConfigure = ''
    sh ./build_configure
  '';

  # -fpermissive helps building opencascade, although gcc detects a flaw in the code
  # and reports an error otherwise. Further versions may fix that.
  NIX_CFLAGS_COMPILE = "-fpermissive"
  # https://bugs.freedesktop.org/show_bug.cgi?id=83631
    + " -DGLX_GLXEXT_LEGACY";

  configureFlags = [ "--with-tcl=${tcl}/lib" "--with-tk=${tk}/lib" "--with-qt=${qt4}" "--with-ftgl=${ftgl}" "--with-freetype=${freetype}" ];

  postInstall = ''
    mv $out/inc $out/include
    mkdir -p $out/share/doc/${name}
    cp -R ../doc $out/share/doc/${name}
  '';

  enableParallelBuilding = true;

  meta = {
    description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation";
    homepage = http://www.opencascade.org/;
    maintainers = with stdenv.lib.maintainers; [viric];
    platforms = with stdenv.lib.platforms; linux;
  };
}