From 4cb80bdb1e3bcd89dbc1d7e55d6465cd825f63f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=A6=D0=B0=D0=BC=D1=83=D1=82=D0=B0=D0=BB=D0=B8?= Date: Tue, 12 Feb 2013 00:59:26 +0400 Subject: [PATCH] warsow: Fix for ui module downloaded from server. --- pkgs/games/warsow/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/games/warsow/default.nix b/pkgs/games/warsow/default.nix index eac49f9ec69b..aeb7e37cd7e4 100644 --- a/pkgs/games/warsow/default.nix +++ b/pkgs/games/warsow/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, unzip, pkgconfig, zlib, curl, libjpeg, libpng, libvorbis -, libtheora, libXxf86dga, libXxf86vm, libXinerama, SDL, mesa, openal +, libtheora, libXxf86dga, libXxf86vm, libXinerama, SDL, mesa, openal, freetype +, makeWrapper }: stdenv.mkDerivation rec { name = "warsow-${version}"; @@ -25,18 +26,20 @@ stdenv.mkDerivation rec { substituteInPlace snd_openal/snd_main.c --replace libopenal.so.1 ${openal}/lib/libopenal.so.1 ''; buildInputs = [ unzip pkgconfig zlib curl libjpeg libpng libvorbis libtheora - libXxf86dga libXxf86vm libXinerama SDL mesa openal ]; + libXxf86dga libXxf86vm libXinerama SDL mesa openal makeWrapper + ]; installPhase = '' dest=$out/opt/warsow cd release - for f in warsow wsw_server wswtv_server; do - substituteInPlace $f --replace BINARY_DIR= BINARY_DIR=$dest - done mkdir -p $dest mkdir -p $out/bin - cp -v {warsow,wsw_server,wswtv_server}.* $dest + cp -v {warsow,wsw_server,wswtv_server}* $dest cp -rv basewsw libs $dest - cp -v warsow wsw_server wswtv_server $out/bin + # Since 1.03 some modules are _always_ downloaded from server, thus + makeWrapper $dest/warsow $out/bin/warsow \ + --suffix-each LD_LIBRARY_PATH ':' "${freetype}/lib" + makeWrapper $dest/wsw_server $out/bin/wsw_server + makeWrapper $dest/wswtv_server $out/bin/wswtv_server ''; postFixup = '' p=$out/opt/warsow/warsow.*