11 pname = "blender-${name}";
12 inherit (blender) version;
15 nativeBuildInputs = [ python39Packages.wrapPython makeWrapper ];
17 mkdir $out/{share/applications,bin} -p
18 sed 's/Exec=blender/Exec=blender-${name}/g' $src/share/applications/blender.desktop > $out/share/applications/blender-${name}.desktop
19 cp -r $src/share/blender $out/share
20 cp -r $src/share/doc $out/share
21 cp -r $src/share/icons $out/share
23 buildPythonPath "$pythonPath"
25 echo '#!/usr/bin/env bash ' >> $out/bin/blender-${name}
26 for p in $program_PATH; do
27 echo "export PATH=\$PATH:$p " >> $out/bin/blender-${name}
29 for p in $program_PYTHONPATH; do
30 echo "export PYTHONPATH=\$PYTHONPATH:$p " >> $out/bin/blender-${name}
32 echo 'exec ${blender}/bin/blender "$@"' >> $out/bin/blender-${name}
33 chmod +x $out/bin/blender-${name}
36 pythonPath = packages;