2021-10-10 21:58:30 +01:00
|
|
|
{ lib, stdenv, fetchzip, libGLU, libGL, libXrandr, libX11, libXxf86vm, zlib }:
|
2012-02-19 13:15:50 +00:00
|
|
|
|
2020-02-26 12:44:13 +00:00
|
|
|
let
|
|
|
|
common = import ./common.nix { inherit fetchzip; };
|
|
|
|
in
|
2012-02-19 13:15:50 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-02-26 12:44:13 +00:00
|
|
|
pname = common.pname;
|
|
|
|
version = common.version;
|
2017-08-29 20:06:49 +01:00
|
|
|
|
2020-02-26 12:44:13 +00:00
|
|
|
src = common.src;
|
2012-02-19 13:15:50 +00:00
|
|
|
|
2020-08-17 19:16:13 +01:00
|
|
|
postPatch = ''
|
|
|
|
sed -ie '/sys\/sysctl.h/d' source/Irrlicht/COSOperator.cpp
|
2021-10-10 21:58:30 +01:00
|
|
|
'' + lib.optionalString stdenv.isAarch64 ''
|
|
|
|
substituteInPlace source/Irrlicht/Makefile \
|
|
|
|
--replace "-DIRRLICHT_EXPORTS=1" "-DIRRLICHT_EXPORTS=1 -DPNG_ARM_NEON_OPT=0"
|
2020-08-17 19:16:13 +01:00
|
|
|
'';
|
|
|
|
|
2012-02-19 13:15:50 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cd source/Irrlicht
|
|
|
|
'';
|
|
|
|
|
2021-10-10 22:54:48 +01:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray+=(sharedlib NDEBUG=1 LDFLAGS="-lX11 -lGL -lXxf86vm")
|
2012-02-19 13:15:50 +00:00
|
|
|
'';
|
|
|
|
|
2021-10-10 22:54:48 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2012-02-19 13:15:50 +00:00
|
|
|
preInstall = ''
|
|
|
|
sed -i s,/usr/local/lib,$out/lib, Makefile
|
|
|
|
mkdir -p $out/lib
|
|
|
|
'';
|
|
|
|
|
2021-10-10 22:54:48 +01:00
|
|
|
buildInputs = [
|
|
|
|
libGLU libGL libXrandr libX11 libXxf86vm
|
|
|
|
] ++ lib.optional stdenv.isAarch64 zlib;
|
2012-02-19 13:15:50 +00:00
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://irrlicht.sourceforge.net/";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.zlib;
|
2012-02-19 13:15:50 +00:00
|
|
|
description = "Open source high performance realtime 3D engine written in C++";
|
2021-01-23 17:15:07 +00:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
2012-02-19 13:15:50 +00:00
|
|
|
};
|
|
|
|
}
|