summary refs log tree commit diff
path: root/pkgs/applications/graphics/freecad
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-03-05 22:27:51 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-03-05 22:27:51 +0000
commit69a67fc7cfc8dc12503e84f0fa490a096afe7436 (patch)
treeb7bc0dcc12e548b8fc37478293ece1744b92152b /pkgs/applications/graphics/freecad
parent6b10954921469d4e5647a36b78e960789d4c7d9c (diff)
downloadnixpkgs-69a67fc7cfc8dc12503e84f0fa490a096afe7436.tar
nixpkgs-69a67fc7cfc8dc12503e84f0fa490a096afe7436.tar.gz
nixpkgs-69a67fc7cfc8dc12503e84f0fa490a096afe7436.tar.bz2
nixpkgs-69a67fc7cfc8dc12503e84f0fa490a096afe7436.tar.lz
nixpkgs-69a67fc7cfc8dc12503e84f0fa490a096afe7436.tar.xz
nixpkgs-69a67fc7cfc8dc12503e84f0fa490a096afe7436.tar.zst
nixpkgs-69a67fc7cfc8dc12503e84f0fa490a096afe7436.zip
Trying to make freecad find pyqt. This required a patch to be able to use PYTHONPATH.
svn path=/nixpkgs/trunk/; revision=26169
Diffstat (limited to 'pkgs/applications/graphics/freecad')
-rw-r--r--pkgs/applications/graphics/freecad/default.nix11
-rw-r--r--pkgs/applications/graphics/freecad/pythonpath.patch19
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