hedgewars: 1.0.0-beta1 -> 1.0.0-beta2

This commit is contained in:
Peter Hoeg 2019-09-19 20:45:35 +08:00
parent e19054ab3c
commit 751b661a09
2 changed files with 49 additions and 35 deletions

View File

@ -1,54 +1,69 @@
{ SDL2_image, SDL2_ttf, SDL2_net, fpc, qt5, ghcWithPackages, ffmpeg, freeglut { mkDerivation, SDL2_image, SDL2_ttf, SDL2_net, fpc, ghcWithPackages, ffmpeg, freeglut
, stdenv, makeWrapper, fetchhg, cmake, pkgconfig, lua5_1, SDL2, SDL2_mixer , lib, fetchhg, cmake, pkgconfig, lua5_1, SDL2, SDL2_mixer
, zlib, libpng, libGLU_combined, physfs , zlib, libpng, libGL, libGLU, physfs
, qtbase, qttools
, withServer ? true
}: }:
let let
ghc = ghcWithPackages (pkgs: with pkgs; [ ghc = ghcWithPackages (pkgs: with pkgs; [
network vector utf8-string bytestring random hslogger SHA bytestring entropy hslogger network pkgs.zlib random
SHA entropy pkgs.zlib sandi regex-tdfa regex-tdfa sandi utf8-string vector
]); ]);
in in
stdenv.mkDerivation { mkDerivation rec {
version = "1.0.0-beta1";
pname = "hedgewars"; pname = "hedgewars";
version = "1.0.0-beta2";
# it's crazy slow to fetch the whole repo but the beta versions are not
# released as tarballs
src = fetchhg { src = fetchhg {
url = "https://hg.hedgewars.org/hedgewars/"; url = "https://hg.hedgewars.org/hedgewars/";
rev = "7ab5cf405686"; rev = "dff37ac61dcf";
sha256 = "1yrspi82ym5zpavka4cv0vh86g3i2mbbg8ccfcsid4f38lgbb9y4"; sha256 = "1dsq6wfv3d7jfnr068b7ixpnqp0h6mj7zgby6h1viwblgbirri78";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig qttools ];
buildInputs = [ buildInputs = [
SDL2_ttf SDL2_net cmake lua5_1 SDL2 SDL2_mixer SDL2_image fpc SDL2_ttf SDL2_net SDL2 SDL2_mixer SDL2_image
ghc ffmpeg freeglut makeWrapper physfs fpc lua5_1
qt5.qttools qt5.qtbase ffmpeg freeglut physfs
]; qtbase
] ++ lib.optional withServer ghc;
postPatch = '' postPatch = ''
substituteInPlace gameServer/CMakeLists.txt --replace mask evaluate substituteInPlace gameServer/CMakeLists.txt \
--replace mask evaluate
''; '';
preBuild = '' cmakeFlags = [
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL2_image}/lib "-DNOVERSIONINFOUPDATE=ON"
-rpath ${SDL2_mixer}/lib "-DNOSERVER=${if withServer then "OFF" else "ON"}"
-rpath ${SDL2_net}/lib ];
-rpath ${SDL2_ttf}/lib
-rpath ${SDL2.out}/lib
-rpath ${libpng.out}/lib
-rpath ${lua5_1}/lib
-rpath ${libGLU_combined}/lib
-rpath ${zlib.out}/lib
"
'';
postInstall = '' NIX_LDFLAGS = lib.concatMapStringsSep " " (e: "-rpath ${e}/lib") [
wrapProgram $out/bin/hwengine --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH:${stdenv.lib.makeLibraryPath [ libGLU_combined freeglut physfs ]} SDL2.out
''; SDL2_image
SDL2_mixer
SDL2_net
SDL2_ttf
libGL
libGLU
libpng.out
lua5_1
physfs
zlib.out
];
meta = with stdenv.lib; { qtWrapperArgs = [
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libGL libGLU freeglut physfs ]}"
];
meta = with lib; {
description = "Turn-based strategy artillery game similar to Worms"; description = "Turn-based strategy artillery game similar to Worms";
homepage = http://hedgewars.org/; homepage = "http://hedgewars.org/";
license = licenses.gpl2; license = licenses.gpl2;
longDescription = '' longDescription = ''
Each player controls a team of several hedgehogs. During the course of Each player controls a team of several hedgehogs. During the course of
@ -74,7 +89,7 @@ stdenv.mkDerivation {
hedgehog or hedgehogs after a player's or CPU turn is shown only when hedgehog or hedgehogs after a player's or CPU turn is shown only when
all movement on the battlefield has ceased).''; all movement on the battlefield has ceased).'';
maintainers = with maintainers; [ kragniz fpletz ]; maintainers = with maintainers; [ kragniz fpletz ];
platforms = ghc.meta.platforms; inherit (ghc.meta) platforms;
hydraPlatforms = []; hydraPlatforms = [];
}; };
} }

View File

@ -22051,9 +22051,8 @@ in
hawkthorne = callPackage ../games/hawkthorne { love = love_0_9; }; hawkthorne = callPackage ../games/hawkthorne { love = love_0_9; };
hedgewars = callPackage ../games/hedgewars { hedgewars = libsForQt5.callPackage ../games/hedgewars {
inherit (haskellPackages) ghcWithPackages; inherit (haskellPackages) ghcWithPackages;
ffmpeg = ffmpeg_2;
}; };
hexen = callPackage ../games/hexen { }; hexen = callPackage ../games/hexen { };