about summary refs log tree commit diff
path: root/pkgs/applications/misc/blender
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2007-12-01 18:05:26 +0000
committerMarc Weber <marco-oweber@gmx.de>2007-12-01 18:05:26 +0000
commit30669073d52466f34ac3aca52a1c26ed1a60c9fd (patch)
tree8a6b2ef2d6f629c4a44576f31dd484e5bbe35a2c /pkgs/applications/misc/blender
parent1bbc6fe55a2832fc1c67bb65baf365858c85f954 (diff)
blender default.nix
svn path=/nixpkgs/trunk/; revision=9813
Diffstat (limited to 'pkgs/applications/misc/blender')
-rw-r--r--pkgs/applications/misc/blender/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix
new file mode 100644
index 0000000000000..3fb66dff3e96c
--- /dev/null
+++ b/pkgs/applications/misc/blender/default.nix
@@ -0,0 +1,41 @@
+args:
+args.stdenv.mkDerivation {
+  name = "blender-2.45";
+
+  src = args.fetchurl {
+    url = http://download.blender.org/source/blender-2.45.tar.gz;
+    sha256 = "1bi7j1fcvrpb96sjpcbm4sldf359sgskfhv7a8pgcxj0bnhp47wj";
+  };
+
+  phases="unpackPhase buildPhase";
+
+  inherit (args) scons SDL freetype openal python openexr mesa;
+
+  buildInputs =(with args; [python scons
+         gettext libjpeg libpng zlib freetype /* fmod smpeg */ freealut openal x11 mesa inputproto libtiff cmake libXi ]);
+
+  # patch SConstruct so that we can pass on additional include.  Either blender
+  # or openEXR is broken. I think OpenEXR should use include "" isntead of <> to
+  # include files beeing in the same directory
+  buildPhase = "
+    sed -i -e \"s=##### END SETUP ##########=env['CPPFLAGS'].append(os.getenv('CPPFLAGS').split(':'))\\n##### END SETUP ##########=\" SConstruct\n"
+    + " CPPFLAGS=-I$openexr/include/OpenEXR"
+    + " scons PREFIX=\$out/nix-support"
+    + " BF_SDL=\$SDL"
+    + " BF_SDL_LIBPATH=\$SDL/lib"
+    + " BF_FREETYPE=\$freetype"
+    + " BF_OPENAL=\$openal"
+    + " BF_PYTHON=\$python"
+    + " BF_OPENEXR_INC=\$openexr/include"
+    + " BF_OPENEXR_LIBPATH=\$openexr/lib"
+    + " BF_INSTALLDIR=\$out/nix-support/dontLinkThatMuch \n"
+    + " ensureDir \$out/bin\n"
+    + " ln -s \$out/nix-support/dontLinkThatMuch/blender \$out/bin/blender"
+    ;
+
+  meta = { 
+      description = "3D Creation/Animation/Publishing System";
+      homepage = http://www.blender.org;
+      license = "GPL-2 BL";
+    };
+}