mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
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:
parent
bb1c9b027d
commit
afc0218ecd
@ -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; {
|
||||
|
@ -1,9 +1,9 @@
|
||||
{ lib, stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, xorg, mesa_glu
|
||||
{ lib, stdenv, stdenv_gcc5, fetchurl, fetchFromGitHub, cmake, pkgconfig, xorg, mesa_glu
|
||||
, mesa_noglu, glew, ocl-icd, python3
|
||||
, cudaSupport ? false, cudatoolkit
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
(if cudaSupport then stdenv_gcc5 else stdenv).mkDerivation rec {
|
||||
name = "opensubdiv-${version}";
|
||||
version = "3.2.0";
|
||||
|
||||
|
@ -9912,6 +9912,7 @@ with pkgs;
|
||||
};
|
||||
|
||||
opensubdiv = callPackage ../development/libraries/opensubdiv {
|
||||
stdenv_gcc5 = overrideCC stdenv gcc5;
|
||||
cmake = cmake_2_8;
|
||||
};
|
||||
|
||||
@ -13619,6 +13620,7 @@ with pkgs;
|
||||
bleachbit = callPackage ../applications/misc/bleachbit { };
|
||||
|
||||
blender = callPackage ../applications/misc/blender {
|
||||
stdenv_gcc5 = overrideCC stdenv gcc5;
|
||||
python = python35;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user