material-maker: fix crash by using export templates from nixpkgs (#394389)

This commit is contained in:
kirillrdy
2025-04-02 02:05:38 +00:00
committed by GitHub
@@ -3,6 +3,7 @@
stdenv,
fetchFromGitHub,
godot3-headless,
godot3-export-templates,
libglvnd,
libX11,
libXcursor,
@@ -46,6 +47,16 @@ stdenv.mkDerivation (finalAttrs: {
export HOME=$TMPDIR
# Link the export-templates to the expected location. The --export commands
# expects the template-file at .../templates/{godot-version}.stable/linux_x11_64_release
mkdir -p $HOME/.local/share/godot
ln -s ${godot3-export-templates}/share/godot/templates $HOME/.local/share/godot
# Don't use the included export template, which might use a mismatched version of godot.
rm ./material_maker/misc/linux/godot.x11.opt.64
substituteInPlace ./export_presets.cfg \
--replace-fail '"material_maker/misc/linux/godot.x11.opt.64"' '""'
mkdir -vp build
godot3-headless -v --export 'Linux/X11' build/material-maker