From 82c97b5cdeb58b73c787f5e11cb47d80b17e5b72 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 21 Jun 2024 15:15:04 +0100 Subject: [PATCH] minetest: fix build on Darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It wants a Mesa‐specific header for some reason, even though it works without X11. --- pkgs/development/libraries/irrlichtmt/default.nix | 9 +++++---- pkgs/games/minetest/default.nix | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/irrlichtmt/default.nix b/pkgs/development/libraries/irrlichtmt/default.nix index 8787fd390efd..538858904291 100644 --- a/pkgs/development/libraries/irrlichtmt/default.nix +++ b/pkgs/development/libraries/irrlichtmt/default.nix @@ -32,13 +32,14 @@ stdenv.mkDerivation (finalAttrs: { libpng libjpeg libGL + ] ++ (if stdenv.hostPlatform.isDarwin then [ + Cocoa + Kernel + ] else [ libX11 libXi libXext - ] ++ lib.optionals stdenv.isDarwin [ - Cocoa - Kernel - ]; + ]); outputs = [ "out" "dev" ]; diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix index ff6a59e08ad7..6c11f8b7a9d0 100644 --- a/pkgs/games/minetest/default.nix +++ b/pkgs/games/minetest/default.nix @@ -34,6 +34,7 @@ , libX11 , ninja , prometheus-cpp +, mesa , OpenGL , OpenAL ? openal , Carbon @@ -95,7 +96,8 @@ stdenv.mkDerivation (finalAttrs: { gmp libspatialindex ] ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform luajit) luajit - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + mesa # for libiconv OpenGL OpenAL @@ -108,6 +110,7 @@ stdenv.mkDerivation (finalAttrs: { openal libogg libvorbis + ] ++ lib.optionals (buildClient && !stdenv.hostPlatform.isDarwin) [ xorg.libX11 ] ++ lib.optionals buildServer [ leveldb