From c74e2b51e85c684b8e116b4289fc3eba75b8f2cf Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 11 Apr 2016 16:52:48 +0300 Subject: [PATCH] mygui: disable some components, support OpenGL renderer --- pkgs/development/libraries/mygui/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/mygui/default.nix b/pkgs/development/libraries/mygui/default.nix index 0a076239b6bd..ae6483f3ac1c 100644 --- a/pkgs/development/libraries/mygui/default.nix +++ b/pkgs/development/libraries/mygui/default.nix @@ -1,7 +1,9 @@ { stdenv, fetchFromGitHub, libX11, unzip, cmake, ois, freetype, libuuid, - boost, pkgconfig, lib, withOgre ? true, ogre ? null } : + boost, pkgconfig, withOgre ? true, ogre ? null, mesa ? null } : -stdenv.mkDerivation rec { +let + renderSystem = if withOgre then "3" else "4"; +in stdenv.mkDerivation rec { name = "mygui-${version}"; version = "3.2.2"; @@ -14,15 +16,15 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + buildInputs = [ libX11 unzip cmake ois freetype libuuid boost pkgconfig (if withOgre then ogre else mesa) ]; - buildInputs = [ libX11 unzip cmake ois freetype libuuid boost pkgconfig ] - ++ lib.optional withOgre [ ogre ]; + # Tools are disabled due to compilation failures. + cmakeFlags = [ "-DMYGUI_BUILD_TOOLS=OFF" "-DMYGUI_BUILD_DEMOS=OFF" "-DMYGUI_RENDERSYSTEM=${renderSystem}" ]; - cmakeFlags = lib.optional (! withOgre) ["-DMYGUI_RENDERSYSTEM=1" "-DMYGUI_BUILD_DEMOS=OFF" "-DMYGUI_BUILD_TOOLS=OFF" "-DMYGUI_BUILD_PLUGINS=OFF"]; - - meta = { + meta = with stdenv.lib; { homepage = http://mygui.info/; description = "Library for creating GUIs for games and 3D applications"; - license = stdenv.lib.licenses.lgpl3Plus; + license = licenses.lgpl3Plus; + platforms = platforms.linux; }; }