about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/cgkit/scons-env.patch22
-rw-r--r--pkgs/top-level/python-packages.nix25
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/cgkit/scons-env.patch b/pkgs/development/python-modules/cgkit/scons-env.patch
new file mode 100644
index 000000000000..65e9d58a0ae4
--- /dev/null
+++ b/pkgs/development/python-modules/cgkit/scons-env.patch
@@ -0,0 +1,22 @@
+diff --git a/supportlib/SConstruct b/supportlib/SConstruct
+index 7f797b9..07907e9 100644
+--- a/supportlib/SConstruct
++++ b/supportlib/SConstruct
+@@ -5,7 +5,7 @@
+ # library.
+ ######################################################################
+ 
+-import sys, glob, os.path
++import sys, glob, os.path, os
+ 
+ # Read the options
+ vars = Variables("cpp_config.cfg")
+@@ -16,7 +16,7 @@ vars.Add("CPPPATH", "The include directories", [])
+ vars.Add("MSVS_VERSION", "The preferred version of MS Visual Studio")
+ 
+ # Create the construction environment
+-env = Environment(variables = vars)
++env = Environment(variables = vars, ENV = os.environ)
+ 
+ # Build the files in "obj"
+ env.VariantDir("obj", "src", duplicate=0)
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 5608f75b15c4..4570586420df 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2946,6 +2946,31 @@ in modules // {
     };
   };
 
+  cgkit = buildPythonPackage rec {
+    version = "2.0.0";
+    name = "cgkit-${version}";
+    disabled = isPy3k;
+
+    src = pkgs.fetchurl {
+      url = "http://downloads.sourceforge.net/project/cgkit/cgkit/cgkit-${version}/cgkit-${version}-py2k.tar.gz";
+      sha256 = "0vvllc42mdyma3c7yqhahs4bfxymm2kvmc4va7dxqr5x0rzh6rd6";
+    };
+
+    patches = [ ../development/python-modules/cgkit/scons-env.patch ];
+
+    buildInputs = with pkgs; [ scons boost mesa ];
+
+    preBuild = ''
+      cd supportlib
+      scons
+      cd -
+    '';
+
+    meta = {
+      homepage = http://cgkit.sourceforge.net;
+      description = "Python Computer Graphics Kit";
+    };
+  };
 
   cheetah = buildPythonPackage rec {
     version = "2.4.4";