anchor.diff:        llvmPackages.openmp SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL
       ])
       ++ optional jackaudioSupport libjack2
  -    ++ optional cudaSupport cudatoolkit
  +    ++ optional cudaSupport cudatoolkit_11
       ++ optional colladaSupport opencollada
       ++ optional spaceNavSupport libspnav;
  -  pythonPath = with python39Packages; [ numpy requests ];
  +  pythonPath = with python310Packages; [ numpy requests ];
   
     postPatch = ''
       # allow usage of dynamically linked embree
  
positive.code: 
  with lib;
  let
    python = python39Packages.python;
    optix = fetchzip {
      url = "https://developer.download.nvidia.com/redist/optix/v7.0/OptiX-7.0.0-include.zip";
      sha256 = "1b3ccd3197anya2bj3psxdrvrpfgiwva5zfv2xmyrl73nb2dvfr7";
    };
  
  in
  stdenv.mkDerivation rec {
    pname = "blender";
    version = "2.93.5";
  
    src = fetchurl {
      url = "https://download.blender.org/source/${pname}-${version}.tar.xz";
      sha256 = "1fsw8w80h8k5w4zmy659bjlzqyn5i198hi1kbpzfrdn8psxg2bfj";
    };
  
    patches = lib.optional stdenv.isDarwin ./darwin.patch;
  
    nativeBuildInputs = [ cmake makeWrapper python39Packages.wrapPython llvmPackages.llvm.dev ]
      ++ optionals cudaSupport [ addOpenGLRunpath ];
    buildInputs =
      [ boost ffmpeg gettext glew ilmbase
        freetype libjpeg libpng libsamplerate libsndfile libtiff
        opencolorio openexr openimagedenoise openimageio2 openjpeg python zlib fftw jemalloc
        alembic
        (opensubdiv.override { inherit cudaSupport; })
        tbb
  
negative.code: { config, stdenv, lib, fetchurl, fetchzip, boost, cmake, ffmpeg, gettext, glew
  , ilmbase, libXi, libX11, libXext, libXrender
  , libjpeg, libpng, libsamplerate, libsndfile
  , libtiff, libGLU, libGL, openal, opencolorio, openexr, openimagedenoise, openimageio2, openjpeg, python310Packages
  , openvdb, libXxf86vm, tbb, alembic
  , zlib, zstd, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath
  , jackaudioSupport ? false, libjack2
  , cudaSupport ? config.cudaSupport or false, cudatoolkit_11
  , colladaSupport ? true, opencollada
  , spaceNavSupport ? stdenv.isLinux, libspnav
  , makeWrapper
  