From 1cdd246d2ba36ad3e11808d006b176b2384289ae Mon Sep 17 00:00:00 2001 From: Cillian de Roiste Date: Tue, 19 Apr 2011 20:17:17 +0000 Subject: [PATCH] Updating Blender to the stable release 2.57 and adding python32 as a build input svn path=/nixpkgs/trunk/; revision=26894 --- pkgs/applications/misc/blender/default.nix | 23 +++++++++++-------- .../misc/blender/python-chmod.patch | 14 ----------- pkgs/top-level/all-packages.nix | 13 +++++++---- 3 files changed, 22 insertions(+), 28 deletions(-) delete mode 100644 pkgs/applications/misc/blender/python-chmod.patch diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 87d91e59823..75d737e5996 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -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; diff --git a/pkgs/applications/misc/blender/python-chmod.patch b/pkgs/applications/misc/blender/python-chmod.patch deleted file mode 100644 index bda04b1cbb4..00000000000 --- a/pkgs/applications/misc/blender/python-chmod.patch +++ /dev/null @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d2e09424777..f4e5c810d86 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };