about summary refs log tree commit diff
path: root/pkgs/games/gemrb
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2021-06-27 13:38:33 +0800
committerPeter Hoeg <peter@hoeg.com>2021-06-27 14:04:02 +0800
commit14ec3c0a82dc8e08effa12ae5a56cd63be036b1f (patch)
tree57f977e52ab5e6e6772c194f32841a6086fb1698 /pkgs/games/gemrb
parentb99a500a045e73fcabfb141b33fe0b9021966040 (diff)
gemrb: vlc is only needed on mac
Diffstat (limited to 'pkgs/games/gemrb')
-rw-r--r--pkgs/games/gemrb/default.nix16
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/games/gemrb/default.nix b/pkgs/games/gemrb/default.nix
index 77c9c7adaf9f5..947957bc3af61 100644
--- a/pkgs/games/gemrb/default.nix
+++ b/pkgs/games/gemrb/default.nix
@@ -20,6 +20,10 @@ let
   backend =
     if (stdenv.isx86_32 || stdenv.isx86_64) then "OpenGL" else "GLES";
 
+  withVLC = stdenv.isDarwin;
+
+  inherit (lib) optional optionalString;
+
 in
 stdenv.mkDerivation rec {
   pname = "gemrb";
@@ -39,19 +43,23 @@ stdenv.mkDerivation rec {
     libGL
     libiconv
     libpng
-    libvlc
     libvorbis
     openal
     python2
     zlib
-  ];
+  ]
+  ++ optional withVLC libvlc;
 
   nativeBuildInputs = [ cmake ];
 
-  LIBVLC_INCLUDE_PATH = "${lib.getDev libvlc}/include";
-  LIBVLC_LIBRARY_PATH = "${lib.getLib libvlc}/lib";
+  # libvlc isn't being detected properly as of 0.9.0, so set it
+  LIBVLC_INCLUDE_PATH = optionalString withVLC "${lib.getDev libvlc}/include";
+  LIBVLC_LIBRARY_PATH = optionalString withVLC "${lib.getLib libvlc}/lib";
 
   cmakeFlags = [
+    "-DDATA_DIR=${placeholder "out"}/share/gemrb"
+    "-DEXAMPLE_CONF_DIR=${placeholder "out"}/share/doc/gemrb/examples"
+    "-DSYSCONF_DIR=/etc"
     # use the Mesa drivers for video on ARM (harmless on x86)
     "-DDISABLE_VIDEOCORE=ON"
     "-DLAYOUT=opt"