2021-05-11 13:07:47 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, libX11, cmake, ois, freetype, libuuid,
|
2020-12-31 07:48:55 +00:00
|
|
|
boost, pkg-config, withOgre ? false, ogre ? null, libGL, libGLU ? null } :
|
2011-03-30 22:08:33 +00:00
|
|
|
|
2016-04-11 13:52:48 +00:00
|
|
|
let
|
|
|
|
renderSystem = if withOgre then "3" else "4";
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "mygui";
|
2020-02-20 12:06:11 +00:00
|
|
|
version = "3.4.0";
|
2016-04-11 11:38:54 +00:00
|
|
|
|
2015-09-26 18:52:33 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MyGUI";
|
|
|
|
repo = "mygui";
|
|
|
|
rev = "MyGUI${version}";
|
2020-02-20 12:06:11 +00:00
|
|
|
sha256 = "0a4zi8w18pjj813n7kmxldl1d9r1jp0iyhkw7pbqgl8f7qaq994w";
|
2011-03-30 22:08:33 +00:00
|
|
|
};
|
|
|
|
|
2021-05-11 13:07:47 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2021-02-20 21:01:53 +00:00
|
|
|
buildInputs = [ libX11 ois freetype libuuid boost ]
|
2020-12-31 07:48:55 +00:00
|
|
|
++ (if withOgre then [ ogre ] else [ libGL libGLU ]);
|
2016-04-11 11:38:54 +00:00
|
|
|
|
2016-04-11 13:52:48 +00:00
|
|
|
# Tools are disabled due to compilation failures.
|
|
|
|
cmakeFlags = [ "-DMYGUI_BUILD_TOOLS=OFF" "-DMYGUI_BUILD_DEMOS=OFF" "-DMYGUI_RENDERSYSTEM=${renderSystem}" ];
|
2016-04-11 11:38:54 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://mygui.info/";
|
2011-03-30 22:08:33 +00:00
|
|
|
description = "Library for creating GUIs for games and 3D applications";
|
2016-04-11 13:52:48 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
2011-03-30 22:08:33 +00:00
|
|
|
};
|
|
|
|
}
|