nixpkgs/pkgs/games/openmw/default.nix

88 lines
1.8 KiB
Nix
Raw Normal View History

2021-05-19 01:30:30 +00:00
{ lib
, mkDerivation
, fetchFromGitHub
, cmake
, pkg-config
, wrapQtAppsHook
2021-05-19 01:30:30 +00:00
, openscenegraph
, mygui
, bullet
, ffmpeg
, boost
, SDL2
, unshield
, openal
, libXt
2021-11-09 19:56:25 +00:00
, lz4
, recastnavigation
2021-05-19 01:30:30 +00:00
}:
2015-09-26 18:00:36 +00:00
let
2021-11-09 19:56:25 +00:00
openscenegraph_openmw = (openscenegraph.override { colladaSupport = true; })
.overrideDerivation (self: {
src = fetchFromGitHub {
owner = "OpenMW";
repo = "osg";
rev = "bbe61c3bc510a4f5bb4aea21cce506519c2d24e6";
sha256 = "sha256-t3smLqstp7wWfi9HXJoBCek+3acqt/ySBYF8RJOG6Mo=";
};
});
bullet_openmw = bullet.overrideDerivation (old: rec {
version = "3.17";
src = fetchFromGitHub {
2021-11-09 19:56:25 +00:00
owner = "bulletphysics";
repo = "bullet3";
rev = version;
sha256 = "sha256-uQ4X8F8nmagbcFh0KexrmnhHIXFSB3A1CCnjPVeHL3Q=";
};
2021-11-09 19:56:25 +00:00
patches = [];
cmakeFlags = (old.cmakeFlags or []) ++ [
"-DUSE_DOUBLE_PRECISION=ON"
"-DBULLET2_MULTITHREADING=ON"
];
});
2021-05-19 01:30:30 +00:00
in
mkDerivation rec {
pname = "openmw";
2021-11-09 19:56:25 +00:00
version = "0.47.0";
2015-09-26 18:00:36 +00:00
src = fetchFromGitHub {
owner = "OpenMW";
repo = "openmw";
rev = "${pname}-${version}";
2021-11-09 19:56:25 +00:00
sha256 = "sha256-Xq9hDUTCQr79Zzjk0CsiXclVTHK6nrSowukIQqVdrKY=";
2015-09-26 18:00:36 +00:00
};
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
2021-05-19 01:30:30 +00:00
buildInputs = [
SDL2
boost
2021-11-09 19:56:25 +00:00
bullet_openmw
2021-05-19 01:30:30 +00:00
ffmpeg
libXt
mygui
openal
2021-11-09 19:56:25 +00:00
openscenegraph_openmw
2021-05-19 01:30:30 +00:00
unshield
2021-11-09 19:56:25 +00:00
lz4
recastnavigation
2021-05-19 01:30:30 +00:00
];
2019-03-14 14:53:34 +00:00
2019-03-13 07:33:02 +00:00
cmakeFlags = [
2021-05-19 01:30:30 +00:00
# as of 0.46, openmw is broken with GLVND
"-DOpenGL_GL_PREFERENCE=LEGACY"
2021-11-09 19:56:25 +00:00
"-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=1"
2019-03-13 07:33:02 +00:00
];
2015-09-26 18:00:36 +00:00
meta = with lib; {
2015-09-26 18:00:36 +00:00
description = "An unofficial open source engine reimplementation of the game Morrowind";
2021-11-09 19:56:25 +00:00
homepage = "https://openmw.org";
license = licenses.gpl3Plus;
2021-11-09 19:56:25 +00:00
maintainers = with maintainers; [ abbradar marius851000 ];
2021-05-19 01:30:30 +00:00
platforms = platforms.linux;
2015-09-26 18:00:36 +00:00
};
}