Files
nixpkgs/pkgs/by-name/my/mygui/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

86 lines
1.8 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
boost,
freetype,
libuuid,
ois,
withOgre ? false,
ogre,
libGL,
libGLU,
libX11,
}:
let
renderSystem = if withOgre then "3" else "4";
in
stdenv.mkDerivation (finalAttrs: {
pname = "mygui";
version = "3.4.3";
__structuredAttrs = true;
strictDeps = true;
src = fetchFromGitHub {
owner = "MyGUI";
repo = "mygui";
tag = "MyGUI${finalAttrs.version}";
hash = "sha256-qif9trHgtWpYiDVXY3cjRsXypjjjgStX8tSWCnXhXlk=";
};
patches = [
(fetchpatch {
name = "darwin-mygui-framework-fix.patch";
url = "https://gitlab.com/OpenMW/openmw-dep/-/raw/ade30e6e98c051ac2a505f6984518f5f41fa87a5/macos/mygui.patch";
sha256 = "sha256-Tk+O4TFgPZOqWAY4c0Q69bZfvIB34wN9e7h0tXhLULU=";
})
];
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
];
# Tools are disabled due to compilation failures.
cmakeFlags = [
(lib.cmakeBool "MYGUI_BUILD_DEMOS" false)
(lib.cmakeBool "MYGUI_BUILD_TOOLS" false)
(lib.cmakeBool "MYGUI_DONT_USE_OBSOLETE" true)
(lib.cmakeFeature "MYGUI_RENDERSYSTEM" renderSystem)
];
meta = {
homepage = "http://mygui.info/";
changelog = "https://github.com/MyGUI/mygui/releases/tag/MyGUI${finalAttrs.version}";
description = "Library for creating GUIs for games and 3D applications";
maintainers = with lib.maintainers; [ sigmasquadron ];
license = lib.licenses.mit;
platforms = lib.platforms.unix;
# error: implicit instantiation of undefined template 'std::char_traits'
badPlatforms = lib.platforms.darwin;
};
})