2014-03-29 15:10:03 +00:00
|
|
|
{ stdenv, fetchurl, cmake, python, gettext
|
2017-02-15 06:11:59 +00:00
|
|
|
, boost, libpng, zlib, glew, lua, doxygen, icu
|
2018-07-21 00:44:44 +00:00
|
|
|
, SDL2, SDL2_image, SDL2_mixer, SDL2_net, SDL2_ttf
|
2014-03-29 15:10:03 +00:00
|
|
|
}:
|
2011-04-17 17:55:29 +00:00
|
|
|
|
2017-02-15 06:11:59 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "widelands-${version}";
|
|
|
|
version = "19";
|
2011-04-17 17:55:29 +00:00
|
|
|
|
2014-03-29 15:10:03 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "RTS with multiple-goods economy";
|
|
|
|
homepage = "http://widelands.org/";
|
2012-10-05 16:36:36 +00: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
|
2014-03-29 15:10:03 +00:00
|
|
|
multiplayer mode.
|
2012-10-05 16:36:36 +00:00
|
|
|
'';
|
2014-03-29 15:10:03 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ raskin jcumming ];
|
2013-11-04 23:04:36 +00:00
|
|
|
hydraPlatforms = [];
|
2011-04-17 17:55:29 +00:00
|
|
|
};
|
2014-03-29 15:10:03 +00:00
|
|
|
|
2017-02-15 06:11:59 +00:00
|
|
|
patches = [
|
|
|
|
./bincmake.patch
|
|
|
|
];
|
2014-03-29 15:10:03 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-11-24 22:47:52 +00:00
|
|
|
url = "https://launchpad.net/widelands/build${version}/build${version}/+download/widelands-build${version}-src-gcc7.tar.bz2";
|
2017-02-15 06:11:59 +00:00
|
|
|
sha256 = "0n2lb1c2dix32j90nir96zfqivn63izr1pmabjnhns3wbb7vhwzg";
|
2011-04-17 17:55:29 +00:00
|
|
|
};
|
|
|
|
|
2014-03-29 15:10:03 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cmakeFlags="
|
2017-02-15 06:11:59 +00:00
|
|
|
-DWL_INSTALL_BASEDIR=$out
|
|
|
|
-DWL_INSTALL_DATADIR=$out/share/widelands
|
|
|
|
-DWL_INSTALL_BINARY=$out/bin
|
2014-03-29 15:10:03 +00:00
|
|
|
"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake python gettext ];
|
|
|
|
|
|
|
|
buildInputs = [
|
2017-02-15 06:11:59 +00:00
|
|
|
boost libpng zlib glew lua doxygen icu
|
|
|
|
SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf
|
2014-03-29 15:10:03 +00:00
|
|
|
];
|
|
|
|
|
2017-02-15 06:11:59 +00:00
|
|
|
prePatch = ''
|
2017-02-15 06:11:59 +00:00
|
|
|
substituteInPlace ./debian/org.widelands.widelands.desktop --replace "/usr/share/games/widelands/data/" "$out/share/widelands/"
|
2017-02-15 06:11:59 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/share/applications/"
|
2017-02-15 06:11:59 +00:00
|
|
|
cp -v "../debian/org.widelands.widelands.desktop" "$out/share/applications/"
|
2017-02-15 06:11:59 +00:00
|
|
|
'';
|
|
|
|
|
2014-03-29 15:10:03 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
}
|