From 28a0fcfa8aba39dadbf07b48bf6c849d73c6b3aa Mon Sep 17 00:00:00 2001 From: Eric Culp Date: Sat, 29 Mar 2025 11:22:25 -0600 Subject: [PATCH] material-maker: fix crash by using export templates from nixpkgs This was previously using a vendored export template built from godot 3.5.2. This probably happened to work when godot3-headless used the same version, but now that godot3 is on 3.6, you would get this fatal error when launching material-maker: ERROR: Pack created with a newer version of the engine: 3.6. at: try_open_pack (core/io/file_access_pack.cpp:217) Instead, use the export templates in nixpkgs (godot3-export-templates). I copied an idiom I saw used for the other godot3 packages. --- pkgs/by-name/ma/material-maker/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/ma/material-maker/package.nix b/pkgs/by-name/ma/material-maker/package.nix index 5861ca8f471c..8a3714fc9b94 100644 --- a/pkgs/by-name/ma/material-maker/package.nix +++ b/pkgs/by-name/ma/material-maker/package.nix @@ -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