ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / games / openmw / default.nix
blob389f59f91a6ad64124745e768a1b42498d1806b5
1 { lib
2 , mkDerivation
3 , fetchFromGitHub
4 , fetchpatch
5 , cmake
6 , pkg-config
7 , wrapQtAppsHook
8 , openscenegraph
9 , mygui
10 , bullet
11 , ffmpeg
12 , boost
13 , SDL2
14 , unshield
15 , openal
16 , libXt
17 , lz4
18 , recastnavigation
21 let
22   openscenegraph_openmw = (openscenegraph.override { colladaSupport = true; })
23     .overrideDerivation (self: {
24       src = fetchFromGitHub {
25         owner = "OpenMW";
26         repo = "osg";
27         rev = "bbe61c3bc510a4f5bb4aea21cce506519c2d24e6";
28         sha256 = "sha256-t3smLqstp7wWfi9HXJoBCek+3acqt/ySBYF8RJOG6Mo=";
29       };
30     });
32   bullet_openmw = bullet.overrideDerivation (old: rec {
33     version = "3.17";
34     src = fetchFromGitHub {
35       owner = "bulletphysics";
36       repo = "bullet3";
37       rev = version;
38       sha256 = "sha256-uQ4X8F8nmagbcFh0KexrmnhHIXFSB3A1CCnjPVeHL3Q=";
39     };
40     patches = [];
41     cmakeFlags = (old.cmakeFlags or []) ++ [
42       "-DUSE_DOUBLE_PRECISION=ON"
43       "-DBULLET2_MULTITHREADING=ON"
44     ];
45   });
48 mkDerivation rec {
49   pname = "openmw";
50   version = "0.47.0";
52   src = fetchFromGitHub {
53     owner = "OpenMW";
54     repo = "openmw";
55     rev = "${pname}-${version}";
56     sha256 = "sha256-Xq9hDUTCQr79Zzjk0CsiXclVTHK6nrSowukIQqVdrKY=";
57   };
59   patches = [
60     (fetchpatch {
61       url = "https://gitlab.com/OpenMW/openmw/-/merge_requests/1239.diff";
62       sha256 = "sha256-RhbIGeE6GyqnipisiMTwWjcFnIiR055hUPL8IkjPgZw=";
63     })
64   ];
66   nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
68   buildInputs = [
69     SDL2
70     boost
71     bullet_openmw
72     ffmpeg
73     libXt
74     mygui
75     openal
76     openscenegraph_openmw
77     unshield
78     lz4
79     recastnavigation
80   ];
82   cmakeFlags = [
83     # as of 0.46, openmw is broken with GLVND
84     "-DOpenGL_GL_PREFERENCE=LEGACY"
85     "-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=1"
86   ];
88   meta = with lib; {
89     description = "An unofficial open source engine reimplementation of the game Morrowind";
90     homepage = "https://openmw.org";
91     license = licenses.gpl3Plus;
92     maintainers = with maintainers; [ abbradar marius851000 ];
93     platforms = platforms.linux;
94   };