@@ -1,6 +1,6 @@
11{ stdenv, fetchurl, cmake, pkgconfig, SDL, SDL_image, SDL_mixer, SDL_net, SDL_ttf
22, pango, gettext, boost, freetype, libvorbis, fribidi, dbus, libpng, pcre
3−, enableTools ? false
3+, makeWrapper, enableTools ? false
44}:
55
66stdenv.mkDerivation rec {
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
1414 sha256 = "0kifp6g1dsr16m6ngjq2hx19h851fqg326ps3krnhpyix963h3x5";
1515 };
1616
17− nativeBuildInputs = [ cmake pkgconfig ];
17+ nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
1818
1919 buildInputs = [ SDL SDL_image SDL_mixer SDL_net SDL_ttf pango gettext boost
2020 libvorbis fribidi dbus libpng pcre ];
@@ -23,6 +23,13 @@ stdenv.mkDerivation rec {
2323
2424 enableParallelBuilding = true;
2525
26+ # Wesnoth doesn't support input frameworks and Unicode input breaks when they are enabled.
27+ postInstall = ''
28+ for i in $out/bin/*; do
29+ wrapProgram "$i" --unset XMODIFIERS
30+ done
31+ '';
32+
2633 meta = with stdenv.lib; {
2734 description = "The Battle for Wesnoth, a free, turn-based strategy game with a fantasy theme";
2835 longDescription = ''