From 64bc336f50a2203f8c8feccd0eef4b5462c6de16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= Date: Wed, 27 Mar 2013 22:25:33 +0100 Subject: [PATCH] Blender 2.66 WIP --- pkgs/applications/misc/blender/default.nix | 17 ++-- .../interpreters/python/3.3/default.nix | 82 +++++++++++++++++++ pkgs/development/libraries/oiio/default.nix | 27 ++++++ pkgs/top-level/all-packages.nix | 7 +- 4 files changed, 124 insertions(+), 9 deletions(-) create mode 100644 pkgs/development/interpreters/python/3.3/default.nix create mode 100644 pkgs/development/libraries/oiio/default.nix diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 828d55ad478..b9c32c982ec 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -1,26 +1,29 @@ -{ stdenv, fetchurl, SDL, cmake, gettext, ilmbase, libXi, libjpeg, -libpng, libsamplerate, libtiff, mesa, openal, openexr, openjpeg, +{ stdenv, fetchurl, SDL, cmake, ffmpeg, gettext, glew, ilmbase, libXi, libjpeg, +libpng, libsamplerate, libtiff, mesa, oiio, openal, openexr, openjpeg, python, zlib, boost }: stdenv.mkDerivation rec { - name = "blender-2.63a"; + name = "blender-2.66a"; src = fetchurl { url = "http://download.blender.org/source/${name}.tar.gz"; - sha256 = "c479b1abfe5fd8a1a5d04b8d21fdbc0fc960d7855b24785b888c09792bca4c1a"; + sha256 = "0wj8x9xk5irvsjc3rm7wzml1j47xcdpdpy84kidafk02biskcqcb"; }; - buildInputs = [ cmake mesa gettext python libjpeg libpng zlib openal - SDL openexr libsamplerate libXi libtiff ilmbase openjpeg boost ]; + buildInputs = [ cmake mesa ffmpeg gettext python glew libjpeg libpng zlib openal + SDL openexr libsamplerate libXi libtiff ilmbase oiio openjpeg boost ]; + cmakeFlags = [ "-DOPENEXR_INC=${openexr}/include/OpenEXR" "-DWITH_OPENCOLLADA=OFF" "-DWITH_INSTALL_PORTABLE=OFF" + "-DPYTHON_LIBRARY=python${python.majorVersion}m" "-DPYTHON_LIBPATH=${python}/lib" + "-DPYTHON_INCLUDE_DIR=${python}/include/python${python.majorVersion}m" ]; - NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR -I${python}/include/${python.libPrefix}"; + NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR -I${python}/include/${python.libPrefix}m"; enableParallelBuilding = true; diff --git a/pkgs/development/interpreters/python/3.3/default.nix b/pkgs/development/interpreters/python/3.3/default.nix new file mode 100644 index 00000000000..7baecad76c6 --- /dev/null +++ b/pkgs/development/interpreters/python/3.3/default.nix @@ -0,0 +1,82 @@ +{ stdenv, fetchurl +, bzip2 +, db4 +, gdbm +, libX11, xproto +, ncurses +, openssl +, readline +, sqlite +, tcl, tk +, zlib +}: + +assert readline != null -> ncurses != null; + +with stdenv.lib; + +let + majorVersion = "3.3"; + version = "${majorVersion}.1rc1"; + + buildInputs = filter (p: p != null) [ + zlib bzip2 gdbm sqlite db4 readline ncurses openssl tcl tk libX11 xproto + ]; +in +stdenv.mkDerivation { + name = "python3-${version}"; + inherit majorVersion version; + + src = fetchurl { + url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.bz2"; + sha256 = "1pnsbdzbd3750jcy32sv1760lv7am4x3f33jn1kmdmd82za279gv"; + }; + + preConfigure = '' + for i in /usr /sw /opt /pkg; do # improve purity + substituteInPlace ./setup.py --replace $i /no-such-path + done + ${optionalString stdenv.isDarwin ''export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2"''} + + configureFlagsArray=( --enable-shared --with-threads + CPPFLAGS="${concatStringsSep " " (map (p: "-I${p}/include") buildInputs)}" + LDFLAGS="${concatStringsSep " " (map (p: "-L${p}/lib") buildInputs)}" + LIBS="-lcrypt ${optionalString (ncurses != null) "-lncurses"}" + ) + ''; + + setupHook = ./setup-hook.sh; + + postInstall = '' + rm -rf "$out/lib/python${majorVersion}/test" + ''; + + passthru = { + zlibSupport = zlib != null; + sqliteSupport = sqlite != null; + db4Support = db4 != null; + readlineSupport = readline != null; + opensslSupport = openssl != null; + tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null); + libPrefix = "python${majorVersion}"; + }; + + enableParallelBuilding = true; + + meta = { + homepage = "http://python.org"; + description = "a high-level dynamically-typed programming language"; + longDescription = '' + Python is a remarkably powerful dynamic programming language that + is used in a wide variety of application domains. Some of its key + distinguishing features include: clear, readable syntax; strong + introspection capabilities; intuitive object orientation; natural + expression of procedural code; full modularity, supporting + hierarchical packages; exception-based error handling; and very + high level dynamic data types. + ''; + license = stdenv.lib.licenses.psfl; + platforms = stdenv.lib.platforms.all; + maintainers = with stdenv.lib.maintainers; [ simons chaoflow ]; + }; +} diff --git a/pkgs/development/libraries/oiio/default.nix b/pkgs/development/libraries/oiio/default.nix new file mode 100644 index 00000000000..1b6b8be115f --- /dev/null +++ b/pkgs/development/libraries/oiio/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, cmake, unzip, boost, libjpeg, libtiff, libpng, openexr, ilmbase }: + +stdenv.mkDerivation rec { + name = "oiio-${version}"; + version = "1.1.8"; + + src = fetchurl { + url = "https://github.com/OpenImageIO/oiio/archive/Release-${version}.zip"; + sha256 = "08a6qhplzs8kianqb1gjgrndg81h3il5531jn9g6i4940b1xispg"; + }; + + buildInputs = [ cmake unzip boost libjpeg libtiff libpng openexr ilmbase ]; + + configurePhase = ""; + + buildPhase = "make ILMBASE_HOME=${ilmbase} OPENEXR_HOME=${openexr} USE_PYTHON=0 INSTALLDIR=$out dist_dir="; + + installPhase = "echo hallo"; + + meta = with stdenv.lib; { + homepage = http://www.openimageio.org; + description = "A library for reading and writing images"; + license = licenses.bsd3; + maintainers = [ maintainers.goibhniu ]; + platforms = platforms.linux; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 354559a1efe..53c4feb0676 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2876,8 +2876,9 @@ let pure = callPackage ../development/interpreters/pure {}; - python3 = python32; + python3 = python33; python32 = callPackage ../development/interpreters/python/3.2 { }; + python33 = callPackage ../development/interpreters/python/3.3 { }; python = python27; python26 = callPackage ../development/interpreters/python/2.6 { }; @@ -4711,6 +4712,8 @@ let opensc = opensc_0_11_7; }; + oiio = callPackage ../development/libraries/oiio { }; + ois = callPackage ../development/libraries/ois {}; opal = callPackage ../development/libraries/opal {}; @@ -6647,7 +6650,7 @@ let }; blender = callPackage ../applications/misc/blender { - python = python32; + python = python3; }; bristol = callPackage ../applications/audio/bristol { };