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 4 , withVideos ? false 5 }: 6 ··· 14 15 mkDerivation rec { 16 inherit pname; 17 - version = "3.3.0"; 18 19 src = fetchurl { 20 - url = "mirror://sourceforge/${pname}/releases/${version}/${pname}-${version}_src.tar.xz"; 21 - sha256 = "1s0n67rh32g0bgq72p4qzkcqjlw58gc70r4r6gl9k90pil9chj6c"; 22 }; 23 24 buildInputs = [ 25 - qtbase qtscript SDL2 libtheora openal 26 - glew physfs fribidi libXrandr 27 ]; 28 nativeBuildInputs = [ 29 - perl zip unzip pkg-config autoconf automake 30 ]; 31 - 32 - preConfigure = "./autogen.sh"; 33 34 postPatch = '' 35 substituteInPlace lib/exceptionhandler/dumpinfo.cpp \ 36 - --replace "which %s" "${which}/bin/which %s" 37 substituteInPlace lib/exceptionhandler/exceptionhandler.cpp \ 38 --replace "which %s" "${which}/bin/which %s" 39 ''; 40 41 - configureFlags = [ "--with-distributor=NixOS" ]; 42 - 43 - hardeningDisable = [ "format" ]; 44 - 45 - enableParallelBuilding = true; 46 47 - postInstall = lib.optionalString withVideos 48 - "cp ${sequences_src} $out/share/warzone2100/sequences.wz"; 49 50 meta = with lib; { 51 description = "A free RTS game, originally developed by Pumpkin Studios"; ··· 62 ''; 63 homepage = "http://wz2100.net"; 64 license = licenses.gpl2Plus; 65 - maintainers = [ maintainers.astsmtl ]; 66 platforms = platforms.linux; 67 }; 68 }
··· 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 + 31 , withVideos ? false 32 }: 33 ··· 41 42 mkDerivation rec { 43 inherit pname; 44 + version = "3.4.1"; 45 46 src = fetchurl { 47 + url = "mirror://sourceforge/${pname}/releases/${version}/${pname}_src.tar.xz"; 48 + sha256 = "0savalmw1kp1sf8vg5aqrl5hc77p4jacxy5y9qj8k2hi2vqdfb7a"; 49 }; 50 51 buildInputs = [ 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 70 ]; 71 + 72 nativeBuildInputs = [ 73 + cmake 74 + ninja 75 + zip unzip 76 + asciidoctor 77 + gettext 78 ]; 79 80 postPatch = '' 81 substituteInPlace lib/exceptionhandler/dumpinfo.cpp \ 82 + --replace '"which "' '"${which}/bin/which "' 83 substituteInPlace lib/exceptionhandler/exceptionhandler.cpp \ 84 --replace "which %s" "${which}/bin/which %s" 85 ''; 86 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 + ]; 95 96 + postInstall = lib.optionalString withVideos '' 97 + cp ${sequences_src} $out/share/warzone2100/sequences.wz 98 + ''; 99 100 meta = with lib; { 101 description = "A free RTS game, originally developed by Pumpkin Studios"; ··· 112 ''; 113 homepage = "http://wz2100.net"; 114 license = licenses.gpl2Plus; 115 + maintainers = with maintainers; [ astsmtl fgaz ]; 116 platforms = platforms.linux; 117 }; 118 }