nixpkgs/pkgs/development/libraries/mygui/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
1.2 KiB
Nix
Raw Normal View History

2022-12-09 09:09:54 +00:00
{ 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";
2022-12-09 09:09:54 +00:00
in
stdenv.mkDerivation rec {
pname = "mygui";
2023-03-23 06:57:45 +00:00
version = "3.4.1";
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}";
2023-03-23 06:57:45 +00:00
hash = "sha256-5u9whibYKPj8tCuhdLOhL4nDisbFAB0NxxdjU/8izb8=";
};
2022-12-09 09:09:54 +00:00
patches = [
./disable-framework.patch
];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
boost
freetype
libuuid
ois
] ++ lib.optionals withOgre [
ogre
] ++ lib.optionals (!withOgre && stdenv.isLinux) [
libGL
libGLU
] ++ lib.optionals stdenv.isLinux [
libX11
] ++ lib.optionals stdenv.isDarwin [
Cocoa
];
2016-04-11 11:38:54 +00:00
# Tools are disabled due to compilation failures.
2022-12-09 09:09:54 +00:00
cmakeFlags = [
"-DMYGUI_BUILD_TOOLS=OFF"
"-DMYGUI_BUILD_DEMOS=OFF"
"-DMYGUI_RENDERSYSTEM=${renderSystem}"
];
2016-04-11 11:38:54 +00:00
meta = with lib; {
homepage = "http://mygui.info/";
description = "Library for creating GUIs for games and 3D applications";
2023-03-23 06:57:45 +00:00
license = licenses.mit;
2022-12-09 09:09:54 +00:00
platforms = platforms.unix;
};
}