1 { lib, stdenv, fetchzip, libGLU, libGL, libXrandr, libX11, libXxf86vm, zlib }:
4 common = import ./common.nix { inherit fetchzip; };
7 stdenv.mkDerivation rec {
9 version = common.version;
14 sed -ie '/sys\/sysctl.h/d' source/Irrlicht/COSOperator.cpp
15 '' + lib.optionalString stdenv.isAarch64 ''
16 substituteInPlace source/Irrlicht/Makefile \
17 --replace "-DIRRLICHT_EXPORTS=1" "-DIRRLICHT_EXPORTS=1 -DPNG_ARM_NEON_OPT=0"
25 makeFlagsArray+=(sharedlib NDEBUG=1 LDFLAGS="-lX11 -lGL -lXxf86vm")
28 enableParallelBuilding = true;
31 sed -i s,/usr/local/lib,$out/lib, Makefile
36 libGLU libGL libXrandr libX11 libXxf86vm
37 ] ++ lib.optional stdenv.isAarch64 zlib;
40 homepage = "http://irrlicht.sourceforge.net/";
41 license = lib.licenses.zlib;
42 description = "Open source high performance realtime 3D engine written in C++";
43 platforms = lib.platforms.linux ++ lib.platforms.darwin;