1 { stdenv, SDL2_image_2_6, SDL2_ttf, SDL2_net, fpc, haskell, ffmpeg_4, freeglut
2 , lib, fetchurl, cmake, pkg-config, lua5_1, SDL2, SDL2_mixer
3 , zlib, libpng, libGL, libGLU, physfs
4 , qtbase, qttools, wrapQtAppsHook
10 ghc = haskell.packages.ghc94.ghcWithPackages (pkgs: with pkgs; [
11 SHA bytestring entropy hslogger network pkgs.zlib random
12 regex-tdfa sandi utf8-string vector
15 stdenv.mkDerivation rec {
20 url = "https://www.hedgewars.org/download/releases/hedgewars-src-${version}.tar.bz2";
21 sha256 = "sha256-IB/l5FvYyls9gbGOwGvWu8n6fCxjvwGQBeL4C+W88hI=";
24 nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ];
27 SDL2_ttf SDL2_net SDL2 SDL2_mixer SDL2_image_2_6
29 llvm # hard-requirement on aarch64, for some reason not strictly necessary on x86-64
30 ffmpeg_4 freeglut physfs
32 ] ++ lib.optional withServer ghc;
35 "-DNOVERSIONINFOUPDATE=ON"
36 "-DNOSERVER=${if withServer then "OFF" else "ON"}"
39 NIX_LDFLAGS = lib.concatMapStringsSep " " (e: "-rpath ${e}/lib") [
54 "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libGL libGLU freeglut physfs ]}"
58 description = "Turn-based strategy artillery game similar to Worms";
59 homepage = "https://hedgewars.org/";
60 license = licenses.gpl2;
62 Each player controls a team of several hedgehogs. During the course of
63 the game, players take turns with one of their hedgehogs. They then use
64 whatever tools and weapons are available to attack and kill the
65 opponents' hedgehogs, thereby winning the game. Hedgehogs may move
66 around the terrain in a variety of ways, normally by walking and jumping
67 but also by using particular tools such as the "Rope" or "Parachute", to
68 move to otherwise inaccessible areas. Each turn is time-limited to
69 ensure that players do not hold up the game with excessive thinking or
72 A large variety of tools and weapons are available for players during
73 the game: Grenade, Cluster Bomb, Bazooka, UFO, Homing Bee, Shotgun,
74 Desert Eagle, Fire Punch, Baseball Bat, Dynamite, Mine, Rope, Pneumatic
75 pick, Parachute. Most weapons, when used, cause explosions that deform
76 the terrain, removing circular chunks. The landscape is an island
77 floating on a body of water, or a restricted cave with water at the
78 bottom. A hedgehog dies when it enters the water (either by falling off
79 the island, or through a hole in the bottom of it), it is thrown off
80 either side of the arena or when its health is reduced, typically from
81 contact with explosions, to zero (the damage dealt to the attacked
82 hedgehog or hedgehogs after a player's or CPU turn is shown only when
83 all movement on the battlefield has ceased).'';
84 maintainers = with maintainers; [ kragniz fpletz ];
85 broken = stdenv.isDarwin;
86 platforms = platforms.linux;