aboutsummaryrefslogtreecommitdiff
path: root/pkgs/games/opendungeons
diff options
context:
space:
mode:
authorRicardo Ardissone <ricardo.ardissone@gmail.com>2016-04-22 22:58:51 -0300
committerRicardo Ardissone <ricardo.ardissone@gmail.com>2016-04-23 17:31:42 -0300
commit71b935c33978ceda7b761c0d798f373407f7a4d1 (patch)
treefcc79164d02795803ae3c29a312643ba8ed47c82 /pkgs/games/opendungeons
parent3f14b00106e74bd6e0d81f8f1af301d38278e0ec (diff)
opendungeons: init at 0.6.0
Diffstat (limited to 'pkgs/games/opendungeons')
-rw-r--r--pkgs/games/opendungeons/cmakepaths.patch17
-rw-r--r--pkgs/games/opendungeons/default.nix22
2 files changed, 39 insertions, 0 deletions
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;
+ };
+}