Merge commit 'refs/pull/14779/head' of git://github.com/NixOS/nixpkgs

This commit is contained in:
Nikolay Amiantov 2016-04-18 14:02:35 +03:00
commit 454a64caff

View File

@ -1,25 +1,29 @@
{ stdenv, fetchurl, bison, flex, gettext, pkgconfig, libpng { stdenv, fetchurl, bison, flex, gettext, pkgconfig, libpng
, libtheora, openal, physfs, mesa, fribidi, fontconfig , libtheora, openal, physfs, mesa, fribidi, fontconfig
, freetype, qt4, glew, libogg, libvorbis, zlib, libX11 , freetype, qt4, glew, libogg, libvorbis, zlib, libX11
, libXrandr, zip, unzip, which , libXrandr, zip, unzip, which, perl
, withVideos ? false , withVideos ? false
}: }:
stdenv.mkDerivation rec {
let
pname = "warzone2100"; pname = "warzone2100";
version = "3.1.1";
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://sourceforge/${pname}/releases/${version}/${name}.tar.xz";
sha256 = "c937a2e2c7afdad00b00767636234bbec4d8b18efb008073445439d32edb76cf";
};
sequences_src = fetchurl { sequences_src = fetchurl {
url = "mirror://sourceforge/${pname}/warzone2100/Videos/high-quality-en/sequences.wz"; url = "mirror://sourceforge/${pname}/warzone2100/Videos/high-quality-en/sequences.wz";
sha256 = "90ff552ca4a70e2537e027e22c5098ea4ed1bc11bb7fc94138c6c941a73d29fa"; sha256 = "90ff552ca4a70e2537e027e22c5098ea4ed1bc11bb7fc94138c6c941a73d29fa";
}; };
in
stdenv.mkDerivation rec {
version = "3.1.5";
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://sourceforge/${pname}/releases/${version}/${name}.tar.xz";
sha256 = "0hm49i2knvvg3wlnryv7h4m84s3qa7jfyym5yy6365sx8wzcrai1";
};
buildInputs = [ bison flex gettext pkgconfig libpng libtheora openal buildInputs = [ bison flex gettext pkgconfig libpng libtheora openal
physfs mesa fribidi fontconfig freetype qt4 physfs mesa fribidi fontconfig freetype qt4
glew libogg libvorbis zlib libX11 libXrandr zip glew libogg libvorbis zlib libX11 libXrandr zip
unzip unzip perl
]; ];
patchPhase = '' patchPhase = ''
substituteInPlace lib/exceptionhandler/dumpinfo.cpp \ substituteInPlace lib/exceptionhandler/dumpinfo.cpp \
@ -31,8 +35,7 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-fpermissive"; # GL header minor incompatibility NIX_CFLAGS_COMPILE = "-fpermissive"; # GL header minor incompatibility
postInstall = [] postInstall = stdenv.lib.optionalString withVideos "cp ${sequences_src} $out/share/warzone2100/sequences.wz";
++ stdenv.lib.optional withVideos "cp ${sequences_src} $out/share/warzone2100/sequences.wz";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A free RTS game, originally developed by Pumpkin Studios"; description = "A free RTS game, originally developed by Pumpkin Studios";