Merge pull request #110761 from fgaz/warzone2100/3.4.1
This commit is contained in:
commit
2c0b4ecab1
@ -1,6 +1,33 @@
|
|||||||
{ lib, stdenv, mkDerivation, fetchurl, autoconf, automake
|
{ lib
|
||||||
, perl, unzip, zip, which, pkg-config, qtbase, qtscript
|
, mkDerivation
|
||||||
, SDL2, libtheora, openal, glew, physfs, fribidi, libXrandr
|
, 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
|
, withVideos ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -14,38 +41,61 @@ in
|
|||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
inherit pname;
|
inherit pname;
|
||||||
version = "3.3.0";
|
version = "3.4.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/${pname}/releases/${version}/${pname}-${version}_src.tar.xz";
|
url = "mirror://sourceforge/${pname}/releases/${version}/${pname}_src.tar.xz";
|
||||||
sha256 = "1s0n67rh32g0bgq72p4qzkcqjlw58gc70r4r6gl9k90pil9chj6c";
|
sha256 = "0savalmw1kp1sf8vg5aqrl5hc77p4jacxy5y9qj8k2hi2vqdfb7a";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
qtbase qtscript SDL2 libtheora openal
|
qtbase
|
||||||
glew physfs fribidi libXrandr
|
qtscript
|
||||||
];
|
SDL2
|
||||||
nativeBuildInputs = [
|
libtheora
|
||||||
perl zip unzip pkg-config autoconf automake
|
libvorbis
|
||||||
|
openal
|
||||||
|
openalSoft
|
||||||
|
glew
|
||||||
|
physfs
|
||||||
|
fribidi
|
||||||
|
libXrandr
|
||||||
|
miniupnpc
|
||||||
|
libsodium
|
||||||
|
curl
|
||||||
|
libpng
|
||||||
|
freetype
|
||||||
|
harfbuzz
|
||||||
|
sqlite
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = "./autogen.sh";
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
zip unzip
|
||||||
|
asciidoctor
|
||||||
|
gettext
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace lib/exceptionhandler/dumpinfo.cpp \
|
substituteInPlace lib/exceptionhandler/dumpinfo.cpp \
|
||||||
--replace "which %s" "${which}/bin/which %s"
|
--replace '"which "' '"${which}/bin/which "'
|
||||||
substituteInPlace lib/exceptionhandler/exceptionhandler.cpp \
|
substituteInPlace lib/exceptionhandler/exceptionhandler.cpp \
|
||||||
--replace "which %s" "${which}/bin/which %s"
|
--replace "which %s" "${which}/bin/which %s"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = [ "--with-distributor=NixOS" ];
|
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="
|
||||||
|
];
|
||||||
|
|
||||||
hardeningDisable = [ "format" ];
|
postInstall = lib.optionalString withVideos ''
|
||||||
|
cp ${sequences_src} $out/share/warzone2100/sequences.wz
|
||||||
enableParallelBuilding = true;
|
'';
|
||||||
|
|
||||||
postInstall = lib.optionalString withVideos
|
|
||||||
"cp ${sequences_src} $out/share/warzone2100/sequences.wz";
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A free RTS game, originally developed by Pumpkin Studios";
|
description = "A free RTS game, originally developed by Pumpkin Studios";
|
||||||
@ -62,7 +112,7 @@ mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
homepage = "http://wz2100.net";
|
homepage = "http://wz2100.net";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = [ maintainers.astsmtl ];
|
maintainers = with maintainers; [ astsmtl fgaz ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user