summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-01-25 17:11:14 +0100
committerGitHub <noreply@github.com>2021-01-25 17:11:14 +0100
commit2c0b4ecab11f7f093f333888b99d9d88915a7fe5 (patch)
tree324f0049b359cc9cd9a2d77c728dfbb242013051 /pkgs
parentd8fe01be29c83eef0fcdc7c9e64fb1f05109c132 (diff)
parent321f70a6035ee7fa311bc2a05b2a9f9490da6eb6 (diff)
downloadnixpkgs-2c0b4ecab11f7f093f333888b99d9d88915a7fe5.tar
nixpkgs-2c0b4ecab11f7f093f333888b99d9d88915a7fe5.tar.gz
nixpkgs-2c0b4ecab11f7f093f333888b99d9d88915a7fe5.tar.bz2
nixpkgs-2c0b4ecab11f7f093f333888b99d9d88915a7fe5.tar.lz
nixpkgs-2c0b4ecab11f7f093f333888b99d9d88915a7fe5.tar.xz
nixpkgs-2c0b4ecab11f7f093f333888b99d9d88915a7fe5.tar.zst
nixpkgs-2c0b4ecab11f7f093f333888b99d9d88915a7fe5.zip
Merge pull request #110761 from fgaz/warzone2100/3.4.1
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/games/warzone2100/default.nix90
1 files changed, 70 insertions, 20 deletions
diff --git a/pkgs/games/warzone2100/default.nix b/pkgs/games/warzone2100/default.nix
index 1f6e2995a2a..ce330536b75 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";
@@ -62,7 +112,7 @@ mkDerivation rec {
     '';
     homepage = "http://wz2100.net";
     license = licenses.gpl2Plus;
-    maintainers = [ maintainers.astsmtl ];
+    maintainers = with maintainers; [ astsmtl fgaz ];
     platforms = platforms.linux;
   };
 }