2024-01-13 08:15:51 +00:00
|
|
|
{ stdenv, SDL2_image_2_6, SDL2_ttf, SDL2_net, fpc, ghcWithPackages, ffmpeg_4, freeglut
|
2021-02-05 17:12:51 +00:00
|
|
|
, lib, fetchurl, cmake, pkg-config, lua5_1, SDL2, SDL2_mixer
|
2020-04-24 23:36:52 +00:00
|
|
|
, zlib, libpng, libGL, libGLU, physfs
|
2022-08-12 12:06:08 +00:00
|
|
|
, qtbase, qttools, wrapQtAppsHook
|
2020-09-25 04:45:31 +00:00
|
|
|
, llvm
|
2020-04-24 23:36:52 +00:00
|
|
|
, withServer ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
ghc = ghcWithPackages (pkgs: with pkgs; [
|
2022-09-14 18:05:37 +00:00
|
|
|
SHA bytestring entropy hslogger network pkgs.zlib random
|
2020-04-24 23:36:52 +00:00
|
|
|
regex-tdfa sandi utf8-string vector
|
|
|
|
]);
|
|
|
|
in
|
2022-08-12 12:06:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "hedgewars";
|
2022-09-14 18:05:37 +00:00
|
|
|
version = "1.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.hedgewars.org/download/releases/hedgewars-src-${version}.tar.bz2";
|
2022-09-14 18:05:37 +00:00
|
|
|
sha256 = "sha256-IB/l5FvYyls9gbGOwGvWu8n6fCxjvwGQBeL4C+W88hI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
SDL2_ttf SDL2_net SDL2 SDL2_mixer SDL2_image_2_6
|
2020-04-24 23:36:52 +00:00
|
|
|
fpc lua5_1
|
2020-09-25 04:45:31 +00:00
|
|
|
llvm # hard-requirement on aarch64, for some reason not strictly necessary on x86-64
|
2023-03-27 19:17:25 +00:00
|
|
|
ffmpeg_4 freeglut physfs
|
2020-04-24 23:36:52 +00:00
|
|
|
qtbase
|
|
|
|
] ++ lib.optional withServer ghc;
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DNOVERSIONINFOUPDATE=ON"
|
|
|
|
"-DNOSERVER=${if withServer then "OFF" else "ON"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
NIX_LDFLAGS = lib.concatMapStringsSep " " (e: "-rpath ${e}/lib") [
|
|
|
|
SDL2.out
|
2024-01-13 08:15:51 +00:00
|
|
|
SDL2_image_2_6
|
2020-04-24 23:36:52 +00:00
|
|
|
SDL2_mixer
|
|
|
|
SDL2_net
|
|
|
|
SDL2_ttf
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
libpng.out
|
|
|
|
lua5_1
|
|
|
|
physfs
|
|
|
|
zlib.out
|
|
|
|
];
|
|
|
|
|
|
|
|
qtWrapperArgs = [
|
|
|
|
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libGL libGLU freeglut physfs ]}"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Turn-based strategy artillery game similar to Worms";
|
2023-11-16 04:20:00 +00:00
|
|
|
homepage = "https://hedgewars.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
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).'';
|
|
|
|
maintainers = with maintainers; [ kragniz fpletz ];
|
2022-09-22 12:36:57 +00:00
|
|
|
broken = stdenv.isDarwin;
|
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|