Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d8fe01be29c8
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2c0b4ecab11f
Choose a head ref
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 25, 2021

  1. Copy the full SHA
    7db3b75 View commit details
  2. warzone2100: 3.3.0 -> 3.4.1

    fgaz committed Jan 25, 2021
    Copy the full SHA
    321f70a View commit details
  3. Copy the full SHA
    2c0b4ec View commit details
Showing with 70 additions and 20 deletions.
  1. +70 −20 pkgs/games/warzone2100/default.nix
90 changes: 70 additions & 20 deletions pkgs/games/warzone2100/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}