Updating Blender to the stable release 2.57 and adding python32 as a build input

svn path=/nixpkgs/trunk/; revision=26894
This commit is contained in:
Cillian de Roiste 2011-04-19 20:17:17 +00:00
parent 47d86a8371
commit 1cdd246d2b
3 changed files with 22 additions and 28 deletions

View File

@ -1,24 +1,27 @@
{stdenv, fetchurl, cmake, mesa, gettext, python, libjpeg, libpng, zlib, openal, SDL
, openexr, libsamplerate, libXi, libtiff, ilmbase }:
{ stdenv, fetchurl, SDL, cmake, gettext, ilmbase, libXi, libjpeg,
libpng, libsamplerate, libtiff, mesa, openal, openexr, openjpeg,
python, zlib }:
stdenv.mkDerivation rec {
name = "blender-2.50a1";
name = "blender-2.57";
src = fetchurl {
url = "http://download.blender.org/source/${name}.tar.gz";
sha256 = "1cik05fmf9b8z3qpwsm6q9h1ia87w1piz87hxhfs24jw6l5pyiwr";
sha256 = "1f4l0zkfmbd8ydzwvmb5jw89y7ywd9k8m2f1b3hrdpgjcqhq3lcb";
};
buildInputs = [ cmake mesa gettext python libjpeg libpng zlib openal SDL openexr libsamplerate
libXi libtiff ilmbase ];
buildInputs = [ cmake mesa gettext python libjpeg libpng zlib openal
SDL openexr libsamplerate libXi libtiff ilmbase openjpeg ];
cmakeFlags = [ "-DOPENEXR_INC=${openexr}/include/OpenEXR" "-DWITH_OPENCOLLADA=OFF"
"-DPYTHON_LIBPATH=${python}/lib" ];
patchPhase = ''
sed -e "s@/usr/local@${python}@" -i build_files/cmake/FindPythonLibsUnix.cmake
'';
cmakeFlags = [ "-DOPENEXR_INC=${openexr}/include/OpenEXR"
"-DWITH_OPENCOLLADA=OFF" "-DWITH_INSTALL_PORTABLE=OFF"];
NIX_CFLAGS_COMPILE = "-iquote ${ilmbase}/include/OpenEXR -I${python}/include/${python.libPrefix}";
patches = [ ./python-chmod.patch ];
meta = {
description = "3D Creation/Animation/Publishing System";
homepage = http://www.blender.org;

View File

@ -1,14 +0,0 @@
As the code copied from the nix store, the files there do not have the 'writeable' permission.
Hence this fix, needed on nix but not on usual LSB linuces.
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 386ef1b..6a180fa 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -152,6 +152,7 @@ IF(WITH_INSTALL)
COMMAND mkdir ${TARGETDIR}/.blender/python # PYTHONPATH and PYTHONHOME is set here
COMMAND mkdir ${TARGETDIR}/.blender/python/lib/
COMMAND cp -R ${PYTHON_LIBPATH}/python${PYTHON_VERSION} ${TARGETDIR}/.blender/python/lib/
+ COMMAND chmod -R +w ${TARGETDIR}/.blender/python/lib/
COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/distutils
COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib2to3

View File

@ -2398,6 +2398,11 @@ let
sw_vers = if stdenv.isDarwin then pkgs.darwinSwVersUtility else null;
};
python32 = callPackage ../development/interpreters/python/3.2 {
arch = if stdenv.isDarwin then pkgs.darwinArchUtility else null;
sw_vers = if stdenv.isDarwin then pkgs.darwinSwVersUtility else null;
};
pythonFull = callPackage ../development/interpreters/python/wrapper.nix {
extraLibs = lib.attrValues python.modules;
};
@ -5808,11 +5813,11 @@ let
blender = callPackage ../applications/misc/blender/2.49.nix { };
blender_2_50 = lowPrio (import ../applications/misc/blender {
inherit stdenv fetchurl cmake mesa gettext libjpeg libpng zlib openal SDL openexr
libsamplerate libtiff ilmbase;
blender_2_57 = lowPrio (import ../applications/misc/blender {
inherit stdenv fetchurl SDL cmake gettext ilmbase libjpeg libpng
libsamplerate libtiff mesa openal openexr openjpeg zlib;
inherit (xlibs) libXi;
python = python3;
python = python32;
});
bvi = callPackage ../applications/editors/bvi { };