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