summary refs log tree commit diff
path: root/pkgs/games/minetest
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/minetest')
-rw-r--r--pkgs/games/minetest/default.nix8
-rw-r--r--pkgs/games/minetest/disable_fixup.patch10
-rw-r--r--pkgs/games/minetest/fix_wordsize_confusion.patch10
3 files changed, 25 insertions, 3 deletions
diff --git a/pkgs/games/minetest/default.nix b/pkgs/games/minetest/default.nix
index 02a53d06506..03c1cb5cc4a 100644
--- a/pkgs/games/minetest/default.nix
+++ b/pkgs/games/minetest/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchFromGitHub, cmake, irrlicht, libpng, bzip2, curl, libogg, jsoncpp
 , libjpeg, libXxf86vm, libGLU, libGL, openal, libvorbis, sqlite, luajit
 , freetype, gettext, doxygen, ncurses, graphviz, xorg, gmp, libspatialindex
-, leveldb, postgresql, hiredis
+, leveldb, postgresql, hiredis, libiconv, OpenGL, OpenAL ? openal, Carbon, Cocoa
 }:
 
 with stdenv.lib;
@@ -39,7 +39,7 @@ let
     ] ++ optionals buildClient [
       "-DOpenGL_GL_PREFERENCE=GLVND"
     ];
-
+    
     NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3
 
     nativeBuildInputs = [ cmake doxygen graphviz ];
@@ -47,6 +47,8 @@ let
     buildInputs = [
       irrlicht luajit jsoncpp gettext freetype sqlite curl bzip2 ncurses
       gmp libspatialindex
+    ] ++ optionals stdenv.isDarwin [ 
+      libiconv OpenGL OpenAL Carbon Cocoa
     ] ++ optionals buildClient [
       libpng libjpeg libGLU libGL openal libogg libvorbis xorg.libX11 libXxf86vm
     ] ++ optionals buildServer [
@@ -62,7 +64,7 @@ let
       homepage = http://minetest.net/;
       description = "Infinite-world block sandbox game";
       license = licenses.lgpl21Plus;
-      platforms = platforms.linux;
+      platforms = platforms.linux ++ platforms.darwin;
       maintainers = with maintainers; [ pyrolagus fpletz ];
     };
   };
diff --git a/pkgs/games/minetest/disable_fixup.patch b/pkgs/games/minetest/disable_fixup.patch
new file mode 100644
index 00000000000..1c378d7f83f
--- /dev/null
+++ b/pkgs/games/minetest/disable_fixup.patch
@@ -0,0 +1,10 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -802,7 +802,6 @@
+ 		install(CODE "
+ 			set(BU_CHMOD_BUNDLE_ITEMS ON)
+ 			include(BundleUtilities)
+-			fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/${BUNDLE_PATH}\" \"\" \"\${CMAKE_INSTALL_PREFIX}/${BINDIR}\")
+ 		" COMPONENT Runtime)
+ 	endif()
+ 
diff --git a/pkgs/games/minetest/fix_wordsize_confusion.patch b/pkgs/games/minetest/fix_wordsize_confusion.patch
new file mode 100644
index 00000000000..9540a434daf
--- /dev/null
+++ b/pkgs/games/minetest/fix_wordsize_confusion.patch
@@ -0,0 +1,10 @@
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -17,6 +17,7 @@
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+ 
++#include <cstdint>
+ #include "irrlicht.h" // createDevice
+ #include "irrlichttypes_extrabloated.h"
+ #include "chat_interface.h"