2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchzip, libGLU, libGL, fetchFromGitHub, cmake, Cocoa, OpenGL, IOKit }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
common = import ./common.nix { inherit fetchzip; };
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "irrlicht-mac";
|
|
|
|
version = common.version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-02-05 17:12:51 +00:00
|
|
|
owner = "quiark";
|
|
|
|
repo = "IrrlichtCMake";
|
|
|
|
rev = "523a5e6ef84be67c3014f7b822b97acfced536ce";
|
|
|
|
sha256 = "10ahnry2zl64wphs233gxhvs6c0345pyf5nwa29mc6yn49x7bidi";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
cp -r ${common.src}/* $sourceRoot/
|
|
|
|
chmod -R 777 $sourceRoot
|
2021-02-05 17:12:51 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2021-03-19 17:17:44 +00:00
|
|
|
buildInputs = [ OpenGL Cocoa IOKit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://irrlicht.sourceforge.net/";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.zlib;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Open source high performance realtime 3D engine written in C++";
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|