anchor.diff:  
   with lib;
   let
  -  python = python39Packages.python;
  +  python = python310Packages.python;
     optix = fetchzip {
  -    url = "https://developer.download.nvidia.com/redist/optix/v7.0/OptiX-7.0.0-include.zip";
  -    sha256 = "1b3ccd3197anya2bj3psxdrvrpfgiwva5zfv2xmyrl73nb2dvfr7";
  +    # url taken from the archlinux blender PKGBUILD
  +    url = "https://developer.download.nvidia.com/redist/optix/v7.3/OptiX-7.3.0-Include.zip";
  +    sha256 = "0max1j4822mchj0xpz9lqzh91zkmvsn4py0r174cvqfz8z8ykjk8";
     };
   
   in
   stdenv.mkDerivation rec {
     pname = "blender";
  -  version = "2.93.5";
  +  version = "3.1.0";
   
     src = fetchurl {
       url = "https://download.blender.org/source/${pname}-${version}.tar.xz";
  -    sha256 = "1fsw8w80h8k5w4zmy659bjlzqyn5i198hi1kbpzfrdn8psxg2bfj";
  +    sha256 = "1d0476bzcz86lwdnyjn7hyzkmhfiqh47ls5h09jlbm7v7k9x69hw";
     };
   
     patches = lib.optional stdenv.isDarwin ./darwin.patch;
   
  -  nativeBuildInputs = [ cmake makeWrapper python39Packages.wrapPython llvmPackages.llvm.dev ]
  +  nativeBuildInputs = [ cmake makeWrapper python310Packages.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
  +      opencolorio openexr openimagedenoise openimageio2 openjpeg python zlib zstd fftw jemalloc
         alembic
         (opensubdiv.override { inherit cudaSupport; })
         tbb
  
positive.code:         --replace '${"$"}{LIBDIR}/opencollada' \
                    '${opencollada}' \
          --replace '${"$"}{PYTHON_LIBPATH}/site-packages/numpy' \
                    '${python39Packages.numpy}/${python.sitePackages}/numpy'
      '' else ''
        substituteInPlace extern/clew/src/clew.c --replace '"libOpenCL.so"' '"${ocl-icd}/lib/libOpenCL.so"'
      '');
  
negative.code:       "-DPYTHON_VERSION=${python.pythonVersion}"
        "-DWITH_PYTHON_INSTALL=OFF"
        "-DWITH_PYTHON_INSTALL_NUMPY=OFF"
        "-DPYTHON_NUMPY_PATH=${python310Packages.numpy}/${python.sitePackages}"
        "-DPYTHON_NUMPY_INCLUDE_DIRS=${python310Packages.numpy}/${python.sitePackages}/numpy/core/include"
        "-DWITH_PYTHON_INSTALL_REQUESTS=OFF"
        "-DWITH_OPENVDB=ON"
        "-DWITH_TBB=ON"
  