diff options
Diffstat (limited to 'pkgs/applications/graphics/freecad')
-rw-r--r-- | pkgs/applications/graphics/freecad/default.nix | 11 | ||||
-rw-r--r-- | pkgs/applications/graphics/freecad/pythonpath.patch | 19 |
2 files changed, 27 insertions, 3 deletions
diff --git a/pkgs/applications/graphics/freecad/default.nix b/pkgs/applications/graphics/freecad/default.nix index 21a28cf1927..e222af4f0e7 100644 --- a/pkgs/applications/graphics/freecad/default.nix +++ b/pkgs/applications/graphics/freecad/default.nix @@ -1,6 +1,6 @@ { fetchsvn, stdenv, cmake, coin3d, xercesc, ode, eigen, qt4, opencascade, gts, boost, zlib, -python, swig, gfortran, soqt, libf2c }: +python, swig, gfortran, soqt, libf2c, pyqt4, makeWrapper }: # It builds but fails to install @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ cmake coin3d xercesc ode eigen qt4 opencascade gts boost - zlib python swig gfortran soqt libf2c ]; + zlib python swig gfortran soqt libf2c pyqt4 makeWrapper ]; enableParallelBuilding = true; @@ -28,7 +28,12 @@ stdenv.mkDerivation rec { export NIX_LDFLAGS="-L${gfortran.gcc}/lib64 $NIX_LDFLAGS"; ''; - patches = [ ./cmakeinstall.patch ]; + postInstall = '' + wrapProgram $out/bin/FreeCAD --prefix PYTHONPATH : $PYTHONPATH \ + --set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1 + ''; + + patches = [ ./cmakeinstall.patch ./pythonpath.patch ]; meta = { homepage = http://free-cad.sourceforge.net/; diff --git a/pkgs/applications/graphics/freecad/pythonpath.patch b/pkgs/applications/graphics/freecad/pythonpath.patch new file mode 100644 index 00000000000..849c778aedb --- /dev/null +++ b/pkgs/applications/graphics/freecad/pythonpath.patch @@ -0,0 +1,19 @@ +http://sourceforge.net/apps/phpbb/free-cad/viewtopic.php?f=4&t=847&p=6364 + +Index: src/Main/MainGui.cpp +=================================================================== +--- a/src/Main/MainGui.cpp (revision 4193) ++++ a/src/Main/MainGui.cpp (working copy) +@@ -149,10 +149,10 @@ + // http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559846 + putenv("LANG=C"); + putenv("LC_ALL=C"); +- putenv("PYTHONPATH="); ++ //putenv("PYTHONPATH="); + #else + setlocale(LC_NUMERIC, "C"); +- _putenv("PYTHONPATH="); ++ //_putenv("PYTHONPATH="); + #endif + + // Name and Version of the Application |