blender: fix enableNumpy option, enable it unconditionally

Workarounds https://developer.blender.org/T74304

Audaspace requires numpy, we already have to provide numpy
unconditionally via PYTHON_NUMPY_PATH.
This commit is contained in:
Dmitry Kalinkin 2020-02-28 13:55:13 -05:00
parent 3a3ccb106e
commit 27578856bf
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333

View file

@ -7,7 +7,7 @@
, jackaudioSupport ? false, libjack2 , jackaudioSupport ? false, libjack2
, cudaSupport ? config.cudaSupport or false, cudatoolkit , cudaSupport ? config.cudaSupport or false, cudatoolkit
, colladaSupport ? true, opencollada , colladaSupport ? true, opencollada
, enableNumpy ? false, makeWrapper , makeWrapper
, pugixml, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL , pugixml, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL
}: }:
@ -117,11 +117,13 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
postInstall = optionalString enableNumpy blenderExecutable =
'' placeholder "out" + (if stdenv.isDarwin then "/Blender.app/Contents/MacOS/Blender" else "/bin/blender");
wrapProgram $out/bin/blender \ # --python-expr is used to workaround https://developer.blender.org/T74304
--prefix PYTHONPATH : ${python3Packages.numpy}/${python.sitePackages} postInstall = ''
''; wrapProgram $blenderExecutable \
--add-flags '--python-expr "import sys; sys.path.append(\"${python3Packages.numpy}/${python.sitePackages}\")"'
'';
# Set RUNPATH so that libcuda and libnvrtc in /run/opengl-driver(-32)/lib can be # Set RUNPATH so that libcuda and libnvrtc in /run/opengl-driver(-32)/lib can be
# found. See the explanation in libglvnd. # found. See the explanation in libglvnd.