2018-06-28 07:58:28 +02:00
|
|
|
{ SDL2_image, SDL2_ttf, SDL2_net, fpc, qt5, ghcWithPackages, ffmpeg, freeglut
|
2017-11-23 08:47:41 +01:00
|
|
|
, stdenv, makeWrapper, fetchurl, cmake, pkgconfig, lua5_1, SDL2, SDL2_mixer
|
2018-02-24 14:12:44 +01:00
|
|
|
, zlib, libpng, libGLU_combined, physfs
|
2014-10-14 17:40:56 +02:00
|
|
|
}:
|
|
|
|
|
2015-05-04 12:43:24 +02:00
|
|
|
let
|
|
|
|
ghc = ghcWithPackages (pkgs: with pkgs; [
|
2019-03-16 12:26:10 +01:00
|
|
|
network vector utf8-string /* broken: bytestring-show */ random hslogger
|
2017-11-23 08:47:41 +01:00
|
|
|
SHA entropy pkgs.zlib sandi regex-tdfa
|
2015-05-04 12:43:24 +02:00
|
|
|
]);
|
|
|
|
in
|
2014-10-14 17:40:56 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2018-12-16 16:25:54 +01:00
|
|
|
version = "0.9.25";
|
2014-10-14 17:40:56 +02:00
|
|
|
name = "hedgewars-${version}";
|
|
|
|
src = fetchurl {
|
2018-06-28 20:43:35 +02:00
|
|
|
url = "https://www.hedgewars.org/download/releases/hedgewars-src-${version}.tar.bz2";
|
2018-12-16 16:25:54 +01:00
|
|
|
sha256 = "08x7fqpy0hpnbfq2k06g522xayi7s53bca819zfhalvqnqs76pdk";
|
2014-10-14 17:40:56 +02:00
|
|
|
};
|
|
|
|
|
2017-09-14 21:24:37 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2014-10-14 17:40:56 +02:00
|
|
|
buildInputs = [
|
2017-11-23 08:47:41 +01:00
|
|
|
SDL2_ttf SDL2_net cmake lua5_1 SDL2 SDL2_mixer SDL2_image fpc
|
2018-06-28 07:58:28 +02:00
|
|
|
ghc ffmpeg freeglut makeWrapper physfs
|
|
|
|
qt5.qttools qt5.qtbase
|
2014-10-14 17:40:56 +02:00
|
|
|
];
|
|
|
|
|
2016-08-06 19:20:18 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace gameServer/CMakeLists.txt --replace mask evaluate
|
|
|
|
'';
|
|
|
|
|
2014-10-14 17:40:56 +02:00
|
|
|
preBuild = ''
|
2017-11-23 08:47:41 +01:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL2_image}/lib
|
|
|
|
-rpath ${SDL2_mixer}/lib
|
|
|
|
-rpath ${SDL2_net}/lib
|
|
|
|
-rpath ${SDL2_ttf}/lib
|
|
|
|
-rpath ${SDL2.out}/lib
|
2015-10-11 16:21:43 +02:00
|
|
|
-rpath ${libpng.out}/lib
|
2014-10-14 17:40:56 +02:00
|
|
|
-rpath ${lua5_1}/lib
|
2018-02-24 14:12:44 +01:00
|
|
|
-rpath ${libGLU_combined}/lib
|
2015-10-11 16:21:43 +02:00
|
|
|
-rpath ${zlib.out}/lib
|
2014-10-14 17:40:56 +02:00
|
|
|
"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2018-02-24 14:12:44 +01:00
|
|
|
wrapProgram $out/bin/hwengine --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH:${stdenv.lib.makeLibraryPath [ libGLU_combined freeglut physfs ]}
|
2014-10-14 17:40:56 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2014-12-30 03:31:03 +01:00
|
|
|
description = "Turn-based strategy artillery game similar to Worms";
|
2014-10-14 17:40:56 +02:00
|
|
|
homepage = http://hedgewars.org/;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
longDescription = ''
|
|
|
|
Each player controls a team of several hedgehogs. During the course of
|
|
|
|
the game, players take turns with one of their hedgehogs. They then use
|
|
|
|
whatever tools and weapons are available to attack and kill the
|
|
|
|
opponents' hedgehogs, thereby winning the game. Hedgehogs may move
|
|
|
|
around the terrain in a variety of ways, normally by walking and jumping
|
|
|
|
but also by using particular tools such as the "Rope" or "Parachute", to
|
|
|
|
move to otherwise inaccessible areas. Each turn is time-limited to
|
|
|
|
ensure that players do not hold up the game with excessive thinking or
|
|
|
|
moving.
|
|
|
|
|
|
|
|
A large variety of tools and weapons are available for players during
|
|
|
|
the game: Grenade, Cluster Bomb, Bazooka, UFO, Homing Bee, Shotgun,
|
|
|
|
Desert Eagle, Fire Punch, Baseball Bat, Dynamite, Mine, Rope, Pneumatic
|
|
|
|
pick, Parachute. Most weapons, when used, cause explosions that deform
|
|
|
|
the terrain, removing circular chunks. The landscape is an island
|
|
|
|
floating on a body of water, or a restricted cave with water at the
|
|
|
|
bottom. A hedgehog dies when it enters the water (either by falling off
|
|
|
|
the island, or through a hole in the bottom of it), it is thrown off
|
|
|
|
either side of the arena or when its health is reduced, typically from
|
|
|
|
contact with explosions, to zero (the damage dealt to the attacked
|
|
|
|
hedgehog or hedgehogs after a player's or CPU turn is shown only when
|
|
|
|
all movement on the battlefield has ceased).'';
|
2016-08-06 19:20:18 +02:00
|
|
|
maintainers = with maintainers; [ kragniz fpletz ];
|
2015-05-04 12:43:24 +02:00
|
|
|
platforms = ghc.meta.platforms;
|
2019-03-16 12:26:10 +01:00
|
|
|
hydraPlatforms = [];
|
|
|
|
broken = true; # depends on broken Haskell package bytestring-show
|
2014-10-14 17:40:56 +02:00
|
|
|
};
|
|
|
|
}
|