1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, boost
, freetype
, libuuid
, ois
, withOgre ? false
, ogre
, libGL
, libGLU
, libX11
, Cocoa
}:
let
renderSystem = if withOgre then "3" else "4";
in
stdenv.mkDerivation rec {
pname = "mygui";
version = "3.4.2";
src = fetchFromGitHub {
owner = "MyGUI";
repo = "mygui";
rev = "MyGUI${version}";
hash = "sha256-yBV0ImOFJlqBPqqOjXYe4SFO2liSGZCEwvehED5Ubj4=";
};
patches = [
./disable-framework.patch
];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
boost
freetype
libuuid
ois
] ++ lib.optionals withOgre [
ogre
] ++ lib.optionals (!withOgre && stdenv.hostPlatform.isLinux) [
libGL
libGLU
] ++ lib.optionals stdenv.hostPlatform.isLinux [
libX11
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
Cocoa
];
# Tools are disabled due to compilation failures.
cmakeFlags = [
"-DMYGUI_BUILD_TOOLS=OFF"
"-DMYGUI_BUILD_DEMOS=OFF"
"-DMYGUI_RENDERSYSTEM=${renderSystem}"
];
meta = with lib; {
homepage = "http://mygui.info/";
description = "Library for creating GUIs for games and 3D applications";
license = licenses.mit;
platforms = platforms.unix;
};
}
|