summary refs log tree commit diff
path: root/pkgs/applications/graphics/freecad/default.nix
blob: 21a28cf1927c65833474f3cdff524d81576b09d8 (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
{ fetchsvn, stdenv, cmake, coin3d, xercesc, ode, eigen, qt4, opencascade, gts,
boost, zlib,
python, swig, gfortran, soqt, libf2c }:

# It builds but fails to install

stdenv.mkDerivation rec {
  name = "freecad-${version}";
  version = "svn-${src.rev}";

  src = fetchsvn {
    url = https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk;
    rev = "4184";
    sha256 = "26bd8407ce38f070b81ef39145aed093eed3c200d165a605b8169162d66568ce";
  };

  buildInputs = [ cmake coin3d xercesc ode eigen qt4 opencascade gts boost
    zlib python swig gfortran soqt libf2c ];

  enableParallelBuilding = true;

  # They are used to boost 1.42, and we have newer boost that require
  # this for freecad to build
  NIX_CFLAGS_COMPILE = "-DBOOST_FILESYSTEM_VERSION=2";

  # This will help only x86_64, but will not hurt on others.
  preBuild = ''
    export NIX_LDFLAGS="-L${gfortran.gcc}/lib64 $NIX_LDFLAGS";
  '';

  patches = [ ./cmakeinstall.patch ];

  meta = {
    homepage = http://free-cad.sourceforge.net/;
    license = [ "GPLv2+" "LGPLv2+" ];
    description = "General purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler";
    maintainers = with stdenv.lib.maintainers; [viric];
    platforms = with stdenv.lib.platforms; linux;
  };
}