Merge pull request #110761 from fgaz/warzone2100/3.4.1

authored by Sandro and committed by GitHub 2c0b4eca d8fe01be

+70 -20
+70 -20
pkgs/games/warzone2100/default.nix
··· 1 - { lib, stdenv, mkDerivation, fetchurl, autoconf, automake 2 - , perl, unzip, zip, which, pkg-config, qtbase, qtscript 3 - , SDL2, libtheora, openal, glew, physfs, fribidi, libXrandr 1 + { lib 2 + , mkDerivation 3 + , fetchurl 4 + , cmake 5 + , ninja 6 + , zip, unzip 7 + , pkg-config 8 + , asciidoctor 9 + , gettext 10 + 11 + , qtbase 12 + , qtscript 13 + , SDL2 14 + , libtheora 15 + , libvorbis 16 + , openal 17 + , openalSoft 18 + , glew 19 + , physfs 20 + , fribidi 21 + , libXrandr 22 + , miniupnpc 23 + , libsodium 24 + , curl 25 + , libpng 26 + , freetype 27 + , harfbuzz 28 + , sqlite 29 + , which 30 + 4 31 , withVideos ? false 5 32 }: 6 33 ··· 14 41 15 42 mkDerivation rec { 16 43 inherit pname; 17 - version = "3.3.0"; 44 + version = "3.4.1"; 18 45 19 46 src = fetchurl { 20 - url = "mirror://sourceforge/${pname}/releases/${version}/${pname}-${version}_src.tar.xz"; 21 - sha256 = "1s0n67rh32g0bgq72p4qzkcqjlw58gc70r4r6gl9k90pil9chj6c"; 47 + url = "mirror://sourceforge/${pname}/releases/${version}/${pname}_src.tar.xz"; 48 + sha256 = "0savalmw1kp1sf8vg5aqrl5hc77p4jacxy5y9qj8k2hi2vqdfb7a"; 22 49 }; 23 50 24 51 buildInputs = [ 25 - qtbase qtscript SDL2 libtheora openal 26 - glew physfs fribidi libXrandr 52 + qtbase 53 + qtscript 54 + SDL2 55 + libtheora 56 + libvorbis 57 + openal 58 + openalSoft 59 + glew 60 + physfs 61 + fribidi 62 + libXrandr 63 + miniupnpc 64 + libsodium 65 + curl 66 + libpng 67 + freetype 68 + harfbuzz 69 + sqlite 27 70 ]; 71 + 28 72 nativeBuildInputs = [ 29 - perl zip unzip pkg-config autoconf automake 73 + cmake 74 + ninja 75 + zip unzip 76 + asciidoctor 77 + gettext 30 78 ]; 31 - 32 - preConfigure = "./autogen.sh"; 33 79 34 80 postPatch = '' 35 81 substituteInPlace lib/exceptionhandler/dumpinfo.cpp \ 36 - --replace "which %s" "${which}/bin/which %s" 82 + --replace '"which "' '"${which}/bin/which "' 37 83 substituteInPlace lib/exceptionhandler/exceptionhandler.cpp \ 38 84 --replace "which %s" "${which}/bin/which %s" 39 85 ''; 40 86 41 - configureFlags = [ "--with-distributor=NixOS" ]; 42 - 43 - hardeningDisable = [ "format" ]; 44 - 45 - enableParallelBuilding = true; 87 + cmakeFlags = [ 88 + "-DWZ_DISTRIBUTOR=NixOS" 89 + # The cmake builder automatically sets CMAKE_INSTALL_BINDIR to an absolute 90 + # path, but this results in an error. 91 + # By resetting it, we let the CMakeLists set it to an accepted value 92 + # based on prefix. 93 + "-DCMAKE_INSTALL_BINDIR=" 94 + ]; 46 95 47 - postInstall = lib.optionalString withVideos 48 - "cp ${sequences_src} $out/share/warzone2100/sequences.wz"; 96 + postInstall = lib.optionalString withVideos '' 97 + cp ${sequences_src} $out/share/warzone2100/sequences.wz 98 + ''; 49 99 50 100 meta = with lib; { 51 101 description = "A free RTS game, originally developed by Pumpkin Studios"; ··· 62 112 ''; 63 113 homepage = "http://wz2100.net"; 64 114 license = licenses.gpl2Plus; 65 - maintainers = [ maintainers.astsmtl ]; 115 + maintainers = with maintainers; [ astsmtl fgaz ]; 66 116 platforms = platforms.linux; 67 117 }; 68 118 }