diff options
author | Joshua Trees <me@jtrees.io> | 2023-09-14 21:36:03 +0200 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2023-10-10 10:58:27 +0200 |
commit | 08170dd535bd9a9512f14088e72a64a6057c1fab (patch) | |
tree | 1d2755d032eba53aa055b0e5b62cdc2acc9cbfd0 /pkgs/games/openmw | |
parent | f9d065801f62e52fa771b933366cc510ad7c371f (diff) | |
download | nixlib-08170dd535bd9a9512f14088e72a64a6057c1fab.tar nixlib-08170dd535bd9a9512f14088e72a64a6057c1fab.tar.gz nixlib-08170dd535bd9a9512f14088e72a64a6057c1fab.tar.bz2 nixlib-08170dd535bd9a9512f14088e72a64a6057c1fab.tar.lz nixlib-08170dd535bd9a9512f14088e72a64a6057c1fab.tar.xz nixlib-08170dd535bd9a9512f14088e72a64a6057c1fab.tar.zst nixlib-08170dd535bd9a9512f14088e72a64a6057c1fab.zip |
openmw: 0.47.0 -> 0.48.0
Co-authored-by: Peter Hoeg <peter@hoeg.com>
Diffstat (limited to 'pkgs/games/openmw')
-rw-r--r-- | pkgs/games/openmw/default.nix | 103 | ||||
-rw-r--r-- | pkgs/games/openmw/tes3mp.nix | 12 |
2 files changed, 58 insertions, 57 deletions
diff --git a/pkgs/games/openmw/default.nix b/pkgs/games/openmw/default.nix index 3f6ce29c3a33..99c58df37244 100644 --- a/pkgs/games/openmw/default.nix +++ b/pkgs/games/openmw/default.nix @@ -1,79 +1,69 @@ { lib , stdenv -, mkDerivation -, fetchFromGitHub +, fetchFromGitLab , fetchpatch , cmake , pkg-config , wrapQtAppsHook -, openscenegraph -, mygui +, SDL2 +, CoreMedia +, VideoToolbox +, VideoDecodeAcceleration +, boost , bullet , ffmpeg -, boost -, SDL2 -, unshield -, openal , libXt +, luajit , lz4 +, mygui +, openal +, openscenegraph , recastnavigation -, VideoDecodeAcceleration +, unshield +, yaml-cpp }: let - openscenegraph_openmw = (openscenegraph.override { colladaSupport = true; }) - .overrideDerivation (self: { - src = fetchFromGitHub { - owner = "OpenMW"; - repo = "osg"; - rev = "bbe61c3bc510a4f5bb4aea21cce506519c2d24e6"; - sha256 = "sha256-t3smLqstp7wWfi9HXJoBCek+3acqt/ySBYF8RJOG6Mo="; - }; - patches = [ - (fetchpatch { - # For Darwin, OSG doesn't build some plugins as they're redundant with QuickTime. - # OpenMW doesn't like this, and expects them to be there. Apply their patch for it. - name = "darwin-osg-plugins-fix.patch"; - url = "https://gitlab.com/OpenMW/openmw-dep/-/raw/0abe3c9c3858211028d881d7706813d606335f72/macos/osg.patch"; - sha256 = "sha256-/CLRZofZHot8juH78VG1/qhTHPhy5DoPMN+oH8hC58U="; - }) - ]; - }); + GL = "GLVND"; # or "LEGACY"; + + osg' = (openscenegraph.override { colladaSupport = true; }).overrideDerivation (old: { + patches = [ + (fetchpatch { + # Darwin: Without this patch, OSG won't build osgdb_png.so, which is required by OpenMW. + name = "darwin-osg-plugins-fix.patch"; + url = "https://gitlab.com/OpenMW/openmw-dep/-/raw/0abe3c9c3858211028d881d7706813d606335f72/macos/osg.patch"; + sha256 = "sha256-/CLRZofZHot8juH78VG1/qhTHPhy5DoPMN+oH8hC58U="; + }) + ]; + cmakeFlags = (old.cmakeFlags or [ ]) ++ [ + "-Wno-dev" + "-DOpenGL_GL_PREFERENCE=${GL}" + "-DBUILD_OSG_PLUGINS_BY_DEFAULT=0" + "-DBUILD_OSG_DEPRECATED_SERIALIZERS=0" + ] ++ (map (e: "-DBUILD_OSG_PLUGIN_${e}=1") [ "BMP" "DAE" "DDS" "FREETYPE" "JPEG" "OSG" "PNG" "TGA" ]); + }); - bullet_openmw = bullet.overrideDerivation (old: rec { - version = "3.17"; - src = fetchFromGitHub { - owner = "bulletphysics"; - repo = "bullet3"; - rev = version; - sha256 = "sha256-uQ4X8F8nmagbcFh0KexrmnhHIXFSB3A1CCnjPVeHL3Q="; - }; - patches = []; - cmakeFlags = (old.cmakeFlags or []) ++ [ + bullet' = bullet.overrideDerivation (old: { + cmakeFlags = (old.cmakeFlags or [ ]) ++ [ + "-Wno-dev" + "-DOpenGL_GL_PREFERENCE=${GL}" "-DUSE_DOUBLE_PRECISION=ON" "-DBULLET2_MULTITHREADING=ON" ]; }); in -mkDerivation rec { +stdenv.mkDerivation rec { pname = "openmw"; - version = "0.47.0"; + version = "0.48.0"; - src = fetchFromGitHub { + src = fetchFromGitLab { owner = "OpenMW"; repo = "openmw"; rev = "${pname}-${version}"; - sha256 = "sha256-Xq9hDUTCQr79Zzjk0CsiXclVTHK6nrSowukIQqVdrKY="; + hash = "sha256-zkjVt3GfQZsFXl2Ht3lCuQtDMYQWxhdFO4aGSb3rsyo="; }; - patches = [ - (fetchpatch { - url = "https://gitlab.com/OpenMW/openmw/-/merge_requests/1239.diff"; - sha256 = "sha256-RhbIGeE6GyqnipisiMTwWjcFnIiR055hUPL8IkjPgZw="; - }) - ]; - postPatch = '' sed '1i#include <memory>' -i components/myguiplatform/myguidatamanager.cpp # gcc12 '' + lib.optionalString stdenv.isDarwin '' @@ -84,27 +74,30 @@ mkDerivation rec { nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; # If not set, OSG plugin .so files become shell scripts on Darwin. - dontWrapQtApps = true; + dontWrapQtApps = stdenv.isDarwin; buildInputs = [ SDL2 boost - bullet_openmw + bullet' ffmpeg libXt + luajit + lz4 mygui openal - openscenegraph_openmw - unshield - lz4 + osg' recastnavigation + unshield + yaml-cpp ] ++ lib.optionals stdenv.isDarwin [ + CoreMedia VideoDecodeAcceleration + VideoToolbox ]; cmakeFlags = [ - # as of 0.46, openmw is broken with GLVND - "-DOpenGL_GL_PREFERENCE=LEGACY" + "-DOpenGL_GL_PREFERENCE=${GL}" "-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=1" ] ++ lib.optionals stdenv.isDarwin [ "-DOPENMW_OSX_DEPLOYMENT=ON" diff --git a/pkgs/games/openmw/tes3mp.nix b/pkgs/games/openmw/tes3mp.nix index 8b6c96c5286f..48454b42df29 100644 --- a/pkgs/games/openmw/tes3mp.nix +++ b/pkgs/games/openmw/tes3mp.nix @@ -3,6 +3,7 @@ , cmake , openmw , fetchFromGitHub +, fetchpatch , luajit , makeWrapper , symlinkJoin @@ -85,8 +86,15 @@ let --replace "\"./\"" "\"$out/bin/\"" ''; - # https://github.com/TES3MP/openmw-tes3mp/issues/552 - patches = oldAttrs.patches ++ [ ./tes3mp.patch ]; + patches = [ + (fetchpatch { + url = "https://gitlab.com/OpenMW/openmw/-/commit/98a7d90ee258ceef9c70b0b2955d0458ec46f048.patch"; + sha256 = "sha256-RhbIGeE6GyqnipisiMTwWjcFnIiR055hUPL8IkjPgZw="; + }) + + # https://github.com/TES3MP/openmw-tes3mp/issues/552 + ./tes3mp.patch + ]; env.NIX_CFLAGS_COMPILE = "-fpermissive"; |