diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2021-01-25 13:07:03 +0100 |
---|---|---|
committer | Francesco Gazzetta <fgaz@fgaz.me> | 2021-01-25 13:07:03 +0100 |
commit | 321f70a6035ee7fa311bc2a05b2a9f9490da6eb6 (patch) | |
tree | 3eb8e3a4c4d6ae13372cc84da68327e48ec59f2c /pkgs/games/warzone2100 | |
parent | 7db3b75d2107ad28467cfb621ca5dfa37580d6d3 (diff) |
warzone2100: 3.3.0 -> 3.4.1
Diffstat (limited to 'pkgs/games/warzone2100')
-rw-r--r-- | pkgs/games/warzone2100/default.nix | 88 |
1 files changed, 69 insertions, 19 deletions
diff --git a/pkgs/games/warzone2100/default.nix b/pkgs/games/warzone2100/default.nix index cd371e210753a..ce330536b7513 100644 --- a/pkgs/games/warzone2100/default.nix +++ b/pkgs/games/warzone2100/default.nix @@ -1,6 +1,33 @@ -{ lib, stdenv, mkDerivation, fetchurl, autoconf, automake -, perl, unzip, zip, which, pkg-config, qtbase, qtscript -, SDL2, libtheora, openal, glew, physfs, fribidi, libXrandr +{ lib +, mkDerivation +, fetchurl +, cmake +, ninja +, zip, unzip +, pkg-config +, asciidoctor +, gettext + +, qtbase +, qtscript +, SDL2 +, libtheora +, libvorbis +, openal +, openalSoft +, glew +, physfs +, fribidi +, libXrandr +, miniupnpc +, libsodium +, curl +, libpng +, freetype +, harfbuzz +, sqlite +, which + , withVideos ? false }: @@ -14,38 +41,61 @@ in mkDerivation rec { inherit pname; - version = "3.3.0"; + version = "3.4.1"; src = fetchurl { - url = "mirror://sourceforge/${pname}/releases/${version}/${pname}-${version}_src.tar.xz"; - sha256 = "1s0n67rh32g0bgq72p4qzkcqjlw58gc70r4r6gl9k90pil9chj6c"; + url = "mirror://sourceforge/${pname}/releases/${version}/${pname}_src.tar.xz"; + sha256 = "0savalmw1kp1sf8vg5aqrl5hc77p4jacxy5y9qj8k2hi2vqdfb7a"; }; buildInputs = [ - qtbase qtscript SDL2 libtheora openal - glew physfs fribidi libXrandr + qtbase + qtscript + SDL2 + libtheora + libvorbis + openal + openalSoft + glew + physfs + fribidi + libXrandr + miniupnpc + libsodium + curl + libpng + freetype + harfbuzz + sqlite ]; + nativeBuildInputs = [ - perl zip unzip pkg-config autoconf automake + cmake + ninja + zip unzip + asciidoctor + gettext ]; - preConfigure = "./autogen.sh"; - postPatch = '' substituteInPlace lib/exceptionhandler/dumpinfo.cpp \ - --replace "which %s" "${which}/bin/which %s" + --replace '"which "' '"${which}/bin/which "' substituteInPlace lib/exceptionhandler/exceptionhandler.cpp \ --replace "which %s" "${which}/bin/which %s" ''; - configureFlags = [ "--with-distributor=NixOS" ]; - - hardeningDisable = [ "format" ]; - - enableParallelBuilding = true; + cmakeFlags = [ + "-DWZ_DISTRIBUTOR=NixOS" + # The cmake builder automatically sets CMAKE_INSTALL_BINDIR to an absolute + # path, but this results in an error. + # By resetting it, we let the CMakeLists set it to an accepted value + # based on prefix. + "-DCMAKE_INSTALL_BINDIR=" + ]; - postInstall = lib.optionalString withVideos - "cp ${sequences_src} $out/share/warzone2100/sequences.wz"; + postInstall = lib.optionalString withVideos '' + cp ${sequences_src} $out/share/warzone2100/sequences.wz + ''; meta = with lib; { description = "A free RTS game, originally developed by Pumpkin Studios"; |