summary refs log tree commit diff
path: root/pkgs/games/openmw/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/openmw/default.nix')
-rw-r--r--pkgs/games/openmw/default.nix47
1 files changed, 38 insertions, 9 deletions
diff --git a/pkgs/games/openmw/default.nix b/pkgs/games/openmw/default.nix
index 22f3ea8d6ad..8e6ed3cdb82 100644
--- a/pkgs/games/openmw/default.nix
+++ b/pkgs/games/openmw/default.nix
@@ -1,16 +1,32 @@
-{ stdenv, mkDerivationWith, fetchFromGitHub, qtbase, openscenegraph, mygui, bullet, ffmpeg_3
-, boost, cmake, SDL2, unshield, openal, libXt, pkgconfig }:
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, cmake
+, pkg-config
+, openscenegraph
+, mygui
+, bullet
+, ffmpeg
+, boost
+, SDL2
+, unshield
+, openal
+, libXt
+}:
 
 let
   openscenegraph_ = openscenegraph.overrideDerivation (self: {
     src = fetchFromGitHub {
       owner = "OpenMW";
       repo = "osg";
+      # commit does not exist on any branch on the target repository
       rev = "1556cd7966ebc1c80b6626988d2b25fb43a744cf";
       sha256 = "0d74hijzmj82nx3jkv5qmr3pkgvplra0b8fbjx1y3vmzxamb0axd";
     };
   });
-in mkDerivationWith stdenv.mkDerivation rec {
+
+in
+mkDerivation rec {
   version = "0.46.0";
   pname = "openmw";
 
@@ -21,20 +37,33 @@ in mkDerivationWith stdenv.mkDerivation rec {
     sha256 = "0rm32zsmxvr6b0jjihfj543skhicbw5kg6shjx312clhlm035w2x";
   };
 
-  enableParallelBuilding = true;
+  nativeBuildInputs = [ cmake pkg-config ];
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ cmake boost ffmpeg_3 bullet mygui openscenegraph_ SDL2 unshield openal libXt qtbase ];
+  buildInputs = [
+    SDL2
+    boost
+    bullet
+    ffmpeg
+    libXt
+    mygui
+    openal
+    openscenegraph_
+    unshield
+  ];
 
   cmakeFlags = [
     "-DDESIRED_QT_VERSION:INT=5"
+    # as of 0.46, openmw is broken with GLVND
+    "-DOpenGL_GL_PREFERENCE=LEGACY"
   ];
 
-  meta = with stdenv.lib; {
+  dontWrapQtApps = true;
+
+  meta = with lib; {
     description = "An unofficial open source engine reimplementation of the game Morrowind";
     homepage = "http://openmw.org";
-    license = licenses.gpl3;
-    platforms = platforms.linux;
+    license = licenses.gpl3Plus;
     maintainers = with maintainers; [ abbradar ];
+    platforms = platforms.linux;
   };
 }