2011-04-17 19:55:29 +02:00
|
|
|
x@{builderDefsPackage
|
|
|
|
, libjpeg, boost, SDL, SDL_gfx, SDL_image, SDL_net, SDL_ttf, SDL_sound
|
|
|
|
, gettext, zlib, libiconv, libpng, python, expat, lua5, glew, doxygen
|
|
|
|
, cmake, ggz_base_libs, mesa, SDL_mixer
|
|
|
|
, ...}:
|
|
|
|
builderDefsPackage
|
|
|
|
(a :
|
|
|
|
let
|
|
|
|
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
|
|
[];
|
|
|
|
|
|
|
|
buildInputs = map (n: builtins.getAttr n x)
|
|
|
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
|
|
|
sourceInfo = rec {
|
|
|
|
baseName="widelands";
|
2012-10-05 08:32:34 +02:00
|
|
|
version="build17";
|
2011-04-17 19:55:29 +02:00
|
|
|
name="${baseName}-${version}";
|
|
|
|
project="${baseName}";
|
2012-10-05 08:32:34 +02:00
|
|
|
url="https://launchpadlibrarian.net/102893896/widelands-build17-src.tar.bz2";
|
|
|
|
hash="be48b3b8f342a537b39a3aec2f7702250a6a47e427188ba3bece67d7d90f3cc5";
|
2011-04-17 19:55:29 +02:00
|
|
|
};
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = a.fetchurl {
|
|
|
|
url = sourceInfo.url;
|
|
|
|
sha256 = sourceInfo.hash;
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit (sourceInfo) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
|
|
|
|
/* doConfigure should be removed if not needed */
|
2012-10-05 08:32:34 +02:00
|
|
|
phaseNames = ["killBuildDir" "doPatch" "doCmake" "doMakeInstall" "createScript"];
|
|
|
|
|
|
|
|
patches = [ ./boost_and_cmake_die_die_die.patch ];
|
2011-04-17 19:55:29 +02:00
|
|
|
|
|
|
|
killBuildDir = a.fullDepEntry ''
|
|
|
|
rm -r build
|
|
|
|
'' ["minInit" "doUnpack"];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DLUA_LIBRARIES=-llua"
|
2012-10-05 08:32:34 +02:00
|
|
|
"-DWL_PORTABLE=true"
|
2011-04-17 19:55:29 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
createScript = a.fullDepEntry ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
echo '#! ${a.stdenv.shell}' >> "$out/bin/widelands"
|
|
|
|
echo "cd \"$out/share/games/widelands\"" >> "$out/bin/widelands"
|
|
|
|
echo "\"$out/games/widelands\" \"\$@\"" >> "$out/bin/widelands"
|
|
|
|
chmod a+x "$out/bin/widelands"
|
|
|
|
'' ["minInit"];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Widelands RTS with multiple-goods economy";
|
2012-10-05 18:36:36 +02:00
|
|
|
longDescription = ''
|
|
|
|
Widelands is a real time strategy game based on "The Settlers" and "The
|
|
|
|
Settlers II". It has a single player campaign mode, as well as a networked
|
|
|
|
multiplayer mode.
|
|
|
|
'';
|
|
|
|
|
2011-04-17 19:55:29 +02:00
|
|
|
maintainers = with a.lib.maintainers;
|
|
|
|
[
|
|
|
|
raskin
|
2012-10-05 08:39:00 +02:00
|
|
|
jcumming
|
2011-04-17 19:55:29 +02:00
|
|
|
];
|
2013-01-17 22:34:08 +01:00
|
|
|
#platforms = a.lib.platforms.linux;
|
2011-04-23 15:00:38 +02:00
|
|
|
license = a.lib.licenses.gpl2Plus;
|
2011-04-17 19:55:29 +02:00
|
|
|
};
|
|
|
|
passthru = {
|
|
|
|
updateInfo = {
|
2011-04-23 15:00:38 +02:00
|
|
|
downloadPage = "https://launchpad.net/widelands/+download";
|
2011-04-17 19:55:29 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}) x
|
|
|
|
|