From 6a55b529445a4ca23ce8f7aafcb397a4777eb22a Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sat, 7 Jan 2017 18:47:55 +0300 Subject: [PATCH] warzone2100: 2.1.5 -> 2.2.2 --- pkgs/games/warzone2100/default.nix | 31 +++++++++++++++--------------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/pkgs/games/warzone2100/default.nix b/pkgs/games/warzone2100/default.nix index 7c578f370d7d..dd21d13a0273 100644 --- a/pkgs/games/warzone2100/default.nix +++ b/pkgs/games/warzone2100/default.nix @@ -1,7 +1,5 @@ -{ stdenv, fetchurl, bison, flex, gettext, pkgconfig, libpng -, libtheora, openal, physfs, mesa, fribidi, fontconfig -, freetype, qt4, glew, libogg, libvorbis, zlib, libX11 -, libXrandr, zip, unzip, which, perl +{ stdenv, lib, fetchurl, perl, unzip, zip, which, pkgconfig +, qtbase, qtscript, SDL2, libtheora, openal, glew, physfs, fribidi , withVideos ? false }: @@ -14,28 +12,31 @@ let in stdenv.mkDerivation rec { - version = "3.1.5"; + version = "3.2.2"; name = "${pname}-${version}"; + src = fetchurl { url = "mirror://sourceforge/${pname}/releases/${version}/${name}.tar.xz"; - sha256 = "0hm49i2knvvg3wlnryv7h4m84s3qa7jfyym5yy6365sx8wzcrai1"; + sha256 = "064xfxwkqpvqyy7kz46cwi71mxmimxi4wgjly9g51wwxkvz8snmg"; }; - buildInputs = [ bison flex gettext pkgconfig libpng libtheora openal - physfs mesa fribidi fontconfig freetype qt4 - glew libogg libvorbis zlib libX11 libXrandr zip - unzip perl - ]; - patchPhase = '' + + buildInputs = [ qtbase qtscript SDL2 libtheora openal glew physfs fribidi ]; + nativeBuildInputs = [ perl zip unzip pkgconfig ]; + + postPatch = '' substituteInPlace lib/exceptionhandler/dumpinfo.cpp \ --replace "which %s" "${which}/bin/which %s" substituteInPlace lib/exceptionhandler/exceptionhandler.cpp \ --replace "which %s" "${which}/bin/which %s" ''; - configureFlags = "--with-backend=qt --with-distributor=NixOS"; - NIX_CFLAGS_COMPILE = "-fpermissive"; # GL header minor incompatibility + configureFlags = [ "--with-distributor=NixOS" ]; - postInstall = stdenv.lib.optionalString withVideos "cp ${sequences_src} $out/share/warzone2100/sequences.wz"; + hardeningDisable = [ "format" ]; + + enableParallelBuilding = true; + + postInstall = lib.optionalString withVideos "cp ${sequences_src} $out/share/warzone2100/sequences.wz"; meta = with stdenv.lib; { description = "A free RTS game, originally developed by Pumpkin Studios"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 070aad1d029c..4d538e21d247 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16338,7 +16338,7 @@ in libjpeg = libjpeg62; }; - warzone2100 = callPackage ../games/warzone2100 { }; + warzone2100 = qt5.callPackage ../games/warzone2100 { }; wesnoth = callPackage ../games/wesnoth { };