about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/irrlicht/mac.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/irrlicht/mac.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/irrlicht/mac.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/irrlicht/mac.nix b/nixpkgs/pkgs/development/libraries/irrlicht/mac.nix
new file mode 100644
index 000000000000..beead1f9b857
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/irrlicht/mac.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchzip, libGLU, libGL, unzip, fetchFromGitHub, cmake, Cocoa, OpenGL, IOKit }:
+
+let
+  common = import ./common.nix { inherit fetchzip; };
+in
+
+stdenv.mkDerivation rec {
+  pname = "irrlicht-mac";
+  version = common.version;
+
+  src = fetchFromGitHub {
+		owner = "quiark";
+		repo = "IrrlichtCMake";
+		rev = "523a5e6ef84be67c3014f7b822b97acfced536ce";
+		sha256 = "10ahnry2zl64wphs233gxhvs6c0345pyf5nwa29mc6yn49x7bidi";
+  };
+
+  postUnpack = ''
+    cp -r ${common.src}/* $sourceRoot/
+    chmod -R 777 $sourceRoot
+	'';
+
+  patches = [ ./mac_device.patch ];
+  dontFixCmake = true;
+
+  cmakeFlags = [
+    "-DIRRLICHT_STATIC_LIBRARY=ON"
+    "-DIRRLICHT_BUILD_EXAMPLES=OFF"
+    "-DIRRLICHT_INSTALL_MEDIA_FILES=OFF"
+    "-DIRRLICHT_ENABLE_X11_SUPPORT=OFF"
+    "-DIRRLICHT_BUILD_TOOLS=OFF"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ unzip OpenGL Cocoa IOKit ];
+
+  meta = {
+    homepage = http://irrlicht.sourceforge.net/;
+    license = stdenv.lib.licenses.zlib;
+    description = "Open source high performance realtime 3D engine written in C++";
+    platforms = stdenv.lib.platforms.darwin;
+  };
+}