# IT4Innovations 2022

easyblock = 'Tarball'

name = 'Blender'
version = '3.4.0'

homepage = 'https://www.blender.org/'
description = """Blender is the free and open source 3D creation suite. It supports
 the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering,
 compositing and motion tracking, even video editing and game creation."""

toolchain = {'name': 'GCC', 'version': '10.3.0'}

source_urls = ['https://ftp.nluug.nl/pub/graphics/blender/release/Blender3.4/']
sources = ['blender-%(version)s-linux-x64.tar.xz']
checksums = ['f9aaf69339e4aad3b7927a4cf7ba372453e393df662c92bc1fedf94e0c6b5382']

postinstallcmds = [
	'ml CUDAcore;"nvcc" -arch=sm_80 --cubin "%(installdir)s/3.4/scripts/addons/cycles/source/kernel/device/cuda/kernel.cu" -o "%(installdir)s/3.4/scripts/addons/cycles/lib/kernel_sm_80.cubin" -m64 --ptxas-options="-v" --use_fast_math -DNVCC -I"%(installdir)s/3.4/scripts/addons/cycles/source" -DWITH_NANOVDB',
	'find %(installdir)s -executable -exec chmod +x {} \;',
]

modextrapaths = {'PATH': ''}

sanity_check_paths = {
    'files': ["blender"],
    'dirs': []
}

moduleclass = 'vis'
