blender: Fix CUDA support

CUDA toolkit 8 doesn't support gcc 6, so we have to build opensubdiv
and blender with gcc 5.
This commit is contained in:
Eelco Dolstra
2017-09-16 22:38:31 +02:00
parent bb1c9b027d
commit afc0218ecd
3 changed files with 10 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew
{ stdenv, stdenv_gcc5, lib, fetchurl, boost, cmake, ffmpeg, gettext, glew
, ilmbase, libXi, libX11, libXext, libXrender
, libjpeg, libpng, libsamplerate, libsndfile
, libtiff, mesa, openal, opencolorio, openexr, openimageio, openjpeg_1, python
@@ -10,7 +10,7 @@
with lib;
stdenv.mkDerivation rec {
(if cudaSupport then stdenv_gcc5 else stdenv).mkDerivation rec {
name = "blender-2.79";
src = fetchurl {
@@ -65,6 +65,10 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR -I${python}/include/${python.libPrefix}m";
# Since some dependencies are built with gcc 6, we need gcc 6's
# libstdc++ in our RPATH. Sigh.
NIX_LDFLAGS = optionalString cudaSupport "-rpath ${stdenv.cc.cc.lib}/lib";
enableParallelBuilding = true;
meta = with stdenv.lib; {