diff --git a/pkgs/games/opendungeons/cmakepaths.patch b/pkgs/games/opendungeons/cmakepaths.patch new file mode 100644 index 000000000000..bcffd7a22bcf --- /dev/null +++ b/pkgs/games/opendungeons/cmakepaths.patch @@ -0,0 +1,17 @@ +--- ../CMakeLists.txt ++++ ../CMakeLists.txt +@@ -31,12 +31,12 @@ + set(OD_PLUGINS_CFG_PATH ".") + else() + # Set binary and data install locations if we want to use the installer +- set(OD_BIN_PATH ${CMAKE_INSTALL_PREFIX}/games CACHE PATH "Absolute path to the game binary directory") ++ set(OD_BIN_PATH ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "Absolute path to the game binary directory") + set(OD_DATA_PATH ${CMAKE_INSTALL_PREFIX}/share/games/${PROJECT_NAME} CACHE PATH "Absolute path to the game data directory") + set(OD_SHARE_PATH ${CMAKE_INSTALL_PREFIX}/share CACHE PATH "Absolute path to the shared data directory (desktop file, icons, etc.)") + # Set the plugins.cfg file path to a common but architecture-dependent location. + # Because the plugins.cfg Ogre plugins path path may vary depending on the architecture used. +- set(OD_PLUGINS_CFG_PATH /etc/${PROJECT_NAME} CACHE PATH "Absolute path to the Ogre plugins.cfg file") ++ set(OD_PLUGINS_CFG_PATH ${CMAKE_INSTALL_PREFIX}/etc/${PROJECT_NAME} CACHE PATH "Absolute path to the Ogre plugins.cfg file") + endif() + + if(NOT MSVC) diff --git a/pkgs/games/opendungeons/default.nix b/pkgs/games/opendungeons/default.nix new file mode 100644 index 000000000000..fe3a381c7f5b --- /dev/null +++ b/pkgs/games/opendungeons/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, ogre, cegui, boost, sfml, openal, cmake, ois }: + +stdenv.mkDerivation rec { + name = "opendungeons-${version}"; + version = "0.6.0"; + + src = fetchurl { + url = "ftp://download.tuxfamily.org/opendungeons/${version}/${name}.tar.xz"; + sha256 = "1g0sjh732794h26cbkr0p96i3c0avm0mx9ip5zbvb2y3sbpjcbib"; + }; + + patches = [ ./cmakepaths.patch ]; + + buildInputs = [ cmake ogre cegui boost sfml openal ois ]; + + meta = with stdenv.lib; { + description = "An open source, real time strategy game sharing game elements with the Dungeon Keeper series and Evil Genius."; + homepage = "https://opendungeons.github.io"; + license = [ licenses.gpl3Plus licenses.zlib licenses.mit licenses.cc-by-sa-30 licenses.cc0 licenses.ofl licenses.cc-by-30 ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index abeb980a5321..fcfba76dbf70 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14904,6 +14904,8 @@ in openarena = callPackage ../games/openarena { }; + opendungeons = callPackage ../games/opendungeons { }; + openlierox = callPackage ../games/openlierox { }; openmw = callPackage ../games/openmw { };