nixpkgs/pkgs/development/libraries/irrlicht/default.nix

40 lines
901 B
Nix
Raw Normal View History

{ lib, stdenv, fetchzip, libGLU, libGL, unzip, libXrandr, libX11, libXxf86vm }:
2020-02-26 12:44:13 +00:00
let
common = import ./common.nix { inherit fetchzip; };
in
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;
2020-08-17 19:16:13 +01:00
postPatch = ''
sed -ie '/sys\/sysctl.h/d' source/Irrlicht/COSOperator.cpp
'';
preConfigure = ''
cd source/Irrlicht
'';
buildPhase = ''
make sharedlib NDEBUG=1 "LDFLAGS=-lX11 -lGL -lXxf86vm"
'';
preInstall = ''
sed -i s,/usr/local/lib,$out/lib, Makefile
mkdir -p $out/lib
'';
nativeBuildInputs = [ unzip ];
buildInputs = [ libGLU libGL libXrandr libX11 libXxf86vm ];
meta = {
homepage = "http://irrlicht.sourceforge.net/";
license = lib.licenses.zlib;
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;
};
}