about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-04-11 16:52:48 +0300
committerNikolay Amiantov <ab@fmap.me>2016-04-12 03:08:16 +0300
commitc74e2b51e85c684b8e116b4289fc3eba75b8f2cf (patch)
tree681659fd37f4bb39d2fa79862904d9ab2b413d09 /pkgs
parentc322c042cf2546dbe4a504866bffedd6e6903aa3 (diff)
downloadnixlib-c74e2b51e85c684b8e116b4289fc3eba75b8f2cf.tar
nixlib-c74e2b51e85c684b8e116b4289fc3eba75b8f2cf.tar.gz
nixlib-c74e2b51e85c684b8e116b4289fc3eba75b8f2cf.tar.bz2
nixlib-c74e2b51e85c684b8e116b4289fc3eba75b8f2cf.tar.lz
nixlib-c74e2b51e85c684b8e116b4289fc3eba75b8f2cf.tar.xz
nixlib-c74e2b51e85c684b8e116b4289fc3eba75b8f2cf.tar.zst
nixlib-c74e2b51e85c684b8e116b4289fc3eba75b8f2cf.zip
mygui: disable some components, support OpenGL renderer
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/mygui/default.nix18
1 files 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;
   };
 }