1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 ogre,
7 freetype,
8 boost,
9 expat,
10 libiconv,
11 unstableGitUpdater,
12}:
13
14stdenv.mkDerivation {
15 pname = "cegui";
16 version = "0-unstable-2025-04-06";
17
18 src = fetchFromGitHub {
19 owner = "paroj";
20 repo = "cegui";
21 rev = "a630bcc3f1e4b66edcf0fd00edcb9b29ad8446a3";
22 hash = "sha256-9lZ7eBwmxZ33XNDJXQ2lbCcH5JyH0KoY1mj/g+2HOJs=";
23 };
24
25 strictDeps = true;
26
27 nativeBuildInputs = [
28 cmake
29 ];
30
31 buildInputs = [
32 ogre
33 freetype
34 boost
35 expat
36 ]
37 ++ lib.optionals stdenv.hostPlatform.isDarwin [
38 libiconv
39 ];
40
41 cmakeFlags = [
42 "-DCEGUI_OPTION_DEFAULT_IMAGECODEC=OgreRenderer-0"
43 ]
44 ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
45 "-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}"
46 ];
47
48 passthru.updateScript = unstableGitUpdater {
49 branch = "v0";
50 # The above branch is separate from the branch with the latest tags, so the updater doesn't pick them up
51 # This is what would be used to handle upstream's format, if it was able to see the tags
52 # tagConverter = writeShellScript "cegui-tag-converter.sh" ''
53 # sed -e 's/^v//g' -e 's/-/./g'
54 # '';
55 hardcodeZeroVersion = true;
56 };
57
58 meta = with lib; {
59 homepage = "http://cegui.org.uk/";
60 description = "C++ Library for creating GUIs";
61 mainProgram = "CEGUISampleFramework-0.9999";
62 license = licenses.mit;
63 platforms = platforms.unix;
64 };
65}