diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-03-30 21:58:28 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-03-30 22:03:40 +0200 |
commit | 854e0691074067a0991ff7f147ad4a28409dbf4b (patch) | |
tree | 520438d8a5201a00c1b83b70dcb9c5e87460828a /pkgs/applications/misc/blender | |
parent | 514e3e8a0798d468c0e907adf080c21a09083ba2 (diff) | |
download | nixpkgs-854e0691074067a0991ff7f147ad4a28409dbf4b.tar nixpkgs-854e0691074067a0991ff7f147ad4a28409dbf4b.tar.gz nixpkgs-854e0691074067a0991ff7f147ad4a28409dbf4b.tar.bz2 nixpkgs-854e0691074067a0991ff7f147ad4a28409dbf4b.tar.lz nixpkgs-854e0691074067a0991ff7f147ad4a28409dbf4b.tar.xz nixpkgs-854e0691074067a0991ff7f147ad4a28409dbf4b.tar.zst nixpkgs-854e0691074067a0991ff7f147ad4a28409dbf4b.zip |
blender: Optionally enable numpy support
This is required by some included addons (such as ANT landscape). Note that we can't use -DWITH_PYTHON_INSTALL_NUMPY=ON because it's conditional on -DWITH_PYTHON_INSTALL=ON.
Diffstat (limited to 'pkgs/applications/misc/blender')
-rw-r--r-- | pkgs/applications/misc/blender/default.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix index 0ccca916a1e..c4c57380be9 100644 --- a/pkgs/applications/misc/blender/default.nix +++ b/pkgs/applications/misc/blender/default.nix @@ -1,15 +1,18 @@ { stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew , ilmbase, libXi, libX11, libXext, libXrender , libjpeg, libpng, libsamplerate, libsndfile -, libtiff, libGLU_combined, openal, opencolorio, openexr, openimageio, openjpeg_1, python +, libtiff, libGLU_combined, openal, opencolorio, openexr, openimageio, openjpeg_1, pythonPackages , zlib, fftw, opensubdiv, freetype, jemalloc, ocl-icd , jackaudioSupport ? false, libjack2 , cudaSupport ? false, cudatoolkit , colladaSupport ? true, opencollada +, enableNumpy ? false, makeWrapper }: with lib; +let python = pythonPackages.python; in + stdenv.mkDerivation rec { name = "blender-2.79b"; @@ -24,6 +27,7 @@ stdenv.mkDerivation rec { freetype libjpeg libpng libsamplerate libsndfile libtiff libGLU_combined openal opencolorio openexr openimageio openjpeg_1 python zlib fftw jemalloc (opensubdiv.override { inherit cudaSupport; }) + makeWrapper ] ++ optional jackaudioSupport libjack2 ++ optional cudaSupport cudatoolkit @@ -70,6 +74,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + postInstall = optionalString enableNumpy + '' + wrapProgram $out/bin/blender \ + --prefix PYTHONPATH : ${pythonPackages.numpy}/lib/python${python.majorVersion}/site-packages + ''; + meta = with stdenv.lib; { description = "3D Creation/Animation/Publishing System"; homepage = https://www.blender.org; |