diff options
author | Alexander Tsamutali <astsmtl@yandex.ru> | 2012-01-29 22:44:49 +0000 |
---|---|---|
committer | Alexander Tsamutali <astsmtl@yandex.ru> | 2012-01-29 22:44:49 +0000 |
commit | 55e74d5e9a03902604fd108d6e51c04dd4126392 (patch) | |
tree | 8a02a5aed91875357d6d81f368e99f3c744c1dd8 /pkgs/games | |
parent | 7fb6f58f99981ffc2522405b78eb68b552df5a52 (diff) |
games/oilrush: New nixpkg.
svn path=/nixpkgs/trunk/; revision=31925
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/oilrush/default.nix | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/pkgs/games/oilrush/default.nix b/pkgs/games/oilrush/default.nix new file mode 100644 index 0000000000000..4605f04e3ae56 --- /dev/null +++ b/pkgs/games/oilrush/default.nix @@ -0,0 +1,74 @@ +{ stdenv, getConfig, fetchurl, libX11, libXext, libXinerama, libXrandr +, libXrender, fontconfig, freetype, openal }: +stdenv.mkDerivation { + name = "oilrush"; + src = + let + url = getConfig [ "oilrush" "url" ] null; + sha256 = getConfig [ "oilrush" "sha256" ] null; + in + assert url != null && sha256 != null; + fetchurl { inherit url sha256; }; + shell = stdenv.shell; + arch = if stdenv.system == "x86_64-linux" then "x64" + else if stdenv.system == "i686-linux" then "x86" + else ""; + unpackPhase = '' + mkdir oilrush + cd oilrush + "$shell" "$src" --tar xf + ''; + patchPhase = '' + cd bin + for f in launcher_$arch libQtCoreUnigine_$arch.so.4 OilRush_$arch + do + patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $f + done + patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ + launcher_$arch + patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib\ + libNetwork_$arch.so + patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib\ + libQtCoreUnigine_$arch.so.4 + patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ + libQtGuiUnigine_$arch.so.4 + patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib\ + libQtNetworkUnigine_$arch.so.4 + patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXrender}/lib:${fontconfig}/lib:${freetype}/lib\ + libQtWebKitUnigine_$arch.so.4 + patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib\ + libQtXmlUnigine_$arch.so.4 + patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib\ + libRakNet_$arch.so + patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXinerama}/lib:${libXrandr}/lib\ + libUnigine_$arch.so + patchelf --set-rpath ${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXinerama}/lib:${libXrandr}/lib\ + OilRush_$arch + ''; + installPhase = '' + cd .. + mkdir -p "$out/opt/oilrush" + cp -r * "$out/opt/oilrush" + mkdir -p "$out/bin" + cat << EOF > "$out/bin/oilrush" + #! /bin/sh + LD_LIBRARY_PATH=.:${openal}/lib:\$LD_LIBRARY_PATH + cd "$out/opt/oilrush" + exec ./launcher_$arch.sh "\$@" + EOF + chmod +x "$out/bin/oilrush" + ''; + meta = { + description = "A naval strategy game"; + longDescription = '' + Oil Rush is a real-time naval strategy game based on group control. It + combines the strategic challenge of a classical RTS with the sheer fun + of Tower Defense. + ''; + homepage = http://oilrush-game.com/; + license = [ "proprietary" ]; + #maintainers = with stdenv.lib.maintainers; [ astsmtl ]; + #platforms = with stdenv.lib.platforms; linux; + }; + +} |