1{ lib
2, stdenv
3, fetchFromGitHub
4, cmake
5, ogre
6, freetype
7, boost
8, expat
9, darwin
10, libiconv
11, unstableGitUpdater
12}:
13
14stdenv.mkDerivation {
15 pname = "cegui";
16 version = "unstable-2023-03-18";
17
18 src = fetchFromGitHub {
19 owner = "paroj";
20 repo = "cegui";
21 rev = "186ce900e293b98f2721c11930248a8de54aa338";
22 hash = "sha256-RJ4MnxklcuxC+ZYEbfma5RDc2aeJ95LuTwNk+FnEhdo=";
23 };
24
25 strictDeps = true;
26
27 nativeBuildInputs = [
28 cmake
29 ];
30
31 buildInputs = [
32 ogre
33 freetype
34 boost
35 expat
36 ] ++ lib.optionals stdenv.isDarwin [
37 darwin.apple_sdk.frameworks.Cocoa
38 darwin.apple_sdk.frameworks.Foundation
39 libiconv
40 ];
41
42 cmakeFlags = [
43 "-DCEGUI_OPTION_DEFAULT_IMAGECODEC=OgreRenderer-0"
44 ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
45 "-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}"
46 ];
47
48 passthru.updateScript = unstableGitUpdater {
49 branch = "v0";
50 };
51
52 meta = with lib; {
53 homepage = "http://cegui.org.uk/";
54 description = "C++ Library for creating GUIs";
55 license = licenses.mit;
56 platforms = platforms.unix;
57 };
58}