From e9761ca2ae6c793ad3578444b5644bbdbcd0d607 Mon Sep 17 00:00:00 2001 From: Edwin Mackenzie-Owen Date: Mon, 12 Aug 2024 20:35:44 +0200 Subject: [PATCH] minetest: add arg for using irrlicht's SDL backend Irrlicht's SDL device (=backend) was enabled by default for the 5.9.0 pre-release, but was disabled again at the last minute before the release due to issues reported by some users. NOTE: the irrlicht device is a compile time option and cannot be switched at runtime. --- pkgs/games/minetest/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix index bd004bc0e8c2..d17be89b4721 100644 --- a/pkgs/games/minetest/default.nix +++ b/pkgs/games/minetest/default.nix @@ -36,6 +36,8 @@ , Kernel , buildClient ? true , buildServer ? true +, SDL2 +, useSDL2 ? false }: stdenv.mkDerivation (finalAttrs: { @@ -53,6 +55,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "BUILD_CLIENT" buildClient) (lib.cmakeBool "BUILD_SERVER" buildServer) (lib.cmakeBool "ENABLE_PROMETHEUS" buildServer) + (lib.cmakeBool "USE_SDL2" useSDL2) # Ensure we use system libraries (lib.cmakeBool "ENABLE_SYSTEM_GMP" true) (lib.cmakeBool "ENABLE_SYSTEM_JSONCPP" true) @@ -102,7 +105,9 @@ stdenv.mkDerivation (finalAttrs: { openal libogg libvorbis - ] ++ lib.optionals (buildClient && !stdenv.hostPlatform.isDarwin) [ + ] ++ lib.optionals (buildClient && useSDL2) [ + SDL2 + ] ++ lib.optionals (buildClient && !stdenv.hostPlatform.isDarwin && !useSDL2) [ xorg.libX11 xorg.libXi ] ++ lib.optionals buildServer [