diff options
author | Roman Plášil <me@rplasil.name> | 2019-10-22 15:48:02 +0800 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2020-02-28 18:50:12 +0100 |
commit | fb285f215301e7856ad5cfc4e4370932cf5c4cd1 (patch) | |
tree | 6aa7c2b8687fa7e481823417686f651fd16606d8 /pkgs/development/libraries | |
parent | 24720dd250cb26025d6dd5dbaf089d48f2493cb5 (diff) | |
download | nixlib-fb285f215301e7856ad5cfc4e4370932cf5c4cd1.tar nixlib-fb285f215301e7856ad5cfc4e4370932cf5c4cd1.tar.gz nixlib-fb285f215301e7856ad5cfc4e4370932cf5c4cd1.tar.bz2 nixlib-fb285f215301e7856ad5cfc4e4370932cf5c4cd1.tar.lz nixlib-fb285f215301e7856ad5cfc4e4370932cf5c4cd1.tar.xz nixlib-fb285f215301e7856ad5cfc4e4370932cf5c4cd1.tar.zst nixlib-fb285f215301e7856ad5cfc4e4370932cf5c4cd1.zip |
minetest: update to 5.1.0 and build on Darwin
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/irrlicht/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/irrlicht/mac.nix | 50 | ||||
-rw-r--r-- | pkgs/development/libraries/irrlicht/mac_device.patch | 20 |
3 files changed, 71 insertions, 1 deletions
diff --git a/pkgs/development/libraries/irrlicht/default.nix b/pkgs/development/libraries/irrlicht/default.nix index 788772888c6d..65b3ce028afe 100644 --- a/pkgs/development/libraries/irrlicht/default.nix +++ b/pkgs/development/libraries/irrlicht/default.nix @@ -29,6 +29,6 @@ stdenv.mkDerivation rec { 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.linux; + platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; }; } diff --git a/pkgs/development/libraries/irrlicht/mac.nix b/pkgs/development/libraries/irrlicht/mac.nix new file mode 100644 index 000000000000..00300d87582d --- /dev/null +++ b/pkgs/development/libraries/irrlicht/mac.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchzip, libGLU, libGL, unzip, fetchFromGitHub, cmake, Cocoa, OpenGL, IOKit }: + +let + version = "1.8.4"; + + irrlichtZip = fetchzip { + name = "irrlichtZip"; + url = "mirror://sourceforge/irrlicht/irrlicht-${version}.zip"; + sha256 = "02sq067fn4xpf0lcyb4vqxmm43qg2nxx770bgrl799yymqbvih5f"; + }; + +in + +stdenv.mkDerivation rec { + pname = "irrlicht-mac"; + inherit version; + + src = fetchFromGitHub { + owner = "quiark"; + repo = "IrrlichtCMake"; + rev = "523a5e6ef84be67c3014f7b822b97acfced536ce"; + sha256 = "10ahnry2zl64wphs233gxhvs6c0345pyf5nwa29mc6yn49x7bidi"; + }; + + postUnpack = '' + cp -r ${irrlichtZip}/* $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; + }; +} diff --git a/pkgs/development/libraries/irrlicht/mac_device.patch b/pkgs/development/libraries/irrlicht/mac_device.patch new file mode 100644 index 000000000000..dc68c509975c --- /dev/null +++ b/pkgs/development/libraries/irrlicht/mac_device.patch @@ -0,0 +1,20 @@ +--- a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm ++++ b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm +@@ -39,7 +39,7 @@ + #include <IOKit/hidsystem/IOHIDUsageTables.h> + #else + /* The header was moved here in Mac OS X 10.1 */ +-#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h> ++#include <IOKit/hid/IOHIDUsageTables.h> + #endif + #include <IOKit/hid/IOHIDLib.h> + #include <IOKit/hid/IOHIDKeys.h> +@@ -496,7 +496,7 @@ + { + [[NSAutoreleasePool alloc] init]; + [NSApplication sharedApplication]; +- [NSApp setDelegate:(id<NSFileManagerDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]]; ++ [NSApp setDelegate:(id<NSApplicationDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]]; + [NSBundle loadNibNamed:@"MainMenu" owner:[NSApp delegate]]; + [NSApp finishLaunching]; + } |