From df4afffb3c4aecdd1460e02f3ec788be30593b7b Mon Sep 17 00:00:00 2001 From: D Anzorge Date: Tue, 15 Feb 2022 18:23:14 +0100 Subject: [PATCH] irrlichtmt: init at 1.9.0mt4 --- .../libraries/irrlichtmt/default.nix | 61 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/irrlichtmt/default.nix diff --git a/pkgs/development/libraries/irrlichtmt/default.nix b/pkgs/development/libraries/irrlichtmt/default.nix new file mode 100644 index 000000000000..e40f2c84b2af --- /dev/null +++ b/pkgs/development/libraries/irrlichtmt/default.nix @@ -0,0 +1,61 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, zlib +, libpng +, libjpeg +, libGL +, libX11 +, libXxf86vm +, withTouchSupport ? false +, libXi +, libXext +, Cocoa +, Kernel +}: +stdenv.mkDerivation rec { + pname = "irrlichtmt"; + version = "1.9.0mt4"; + + src = fetchFromGitHub { + owner = "minetest"; + repo = "irrlicht"; + rev = version; + sha256 = "sha256-YlXn9LrfGkjdb8+zQGDgrInolUYj9nVSF2AXWFpEEkw="; + }; + + nativeBuildInputs = [ + cmake + ]; + + # https://github.com/minetest/minetest/pull/10729 + postPatch = lib.optionalString withTouchSupport '' + substituteInPlace include/IrrCompileConfig.h \ + --replace '//#define _IRR_LINUX_X11_XINPUT2_' '#define _IRR_LINUX_X11_XINPUT2_' + ''; + + buildInputs = [ + zlib + libpng + libjpeg + libGL + libX11 + libXxf86vm + ] ++ lib.optionals withTouchSupport [ + libXi + libXext + ] ++ lib.optionals stdenv.isDarwin [ + Cocoa + Kernel + ]; + + outputs = [ "out" "dev" ]; + + meta = { + homepage = "https://github.com/minetest/irrlicht"; + license = lib.licenses.zlib; + maintainers = with lib.maintainers; [ DeeUnderscore ]; + description = "Minetest project's fork of Irrlicht, a realtime 3D engine written in C++"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 60d3672c422a..8f432f8e4383 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17971,6 +17971,10 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL IOKit; }; + irrlichtmt = callPackage ../development/libraries/irrlichtmt { + inherit (darwin.apple_sdk.frameworks) Cocoa Kernel; + }; + isocodes = callPackage ../development/libraries/iso-codes { }; iso-flags = callPackage ../data/icons/iso-flags { }; @@ -31893,7 +31897,7 @@ with pkgs; inherit (callPackages ../games/minetest { inherit (darwin) libiconv; - inherit (darwin.apple_sdk.frameworks) OpenGL OpenAL Carbon Cocoa Kernel; + inherit (darwin.apple_sdk.frameworks) OpenGL OpenAL Carbon Cocoa; }) minetestclient_5 minetestserver_5;