1 { stdenv, SDL2_image_2_6, SDL2_ttf, SDL2_net, fpc, haskell, ffmpeg, libglut
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=";
25 # Add support for ffmpeg 6.0
26 # https://github.com/hedgewars/hw/pull/74
27 ./support-ffmpeg-6.patch
30 nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ];
33 SDL2_ttf SDL2_net SDL2 SDL2_mixer SDL2_image_2_6
35 llvm # hard-requirement on aarch64, for some reason not strictly necessary on x86-64
38 ] ++ lib.optional withServer ghc;
41 "-DNOVERSIONINFOUPDATE=ON"
42 "-DNOSERVER=${if withServer then "OFF" else "ON"}"
45 NIX_LDFLAGS = lib.concatMapStringsSep " " (e: "-rpath ${e}/lib") [
60 "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libGL libGLU libglut physfs ]}"
64 description = "Turn-based strategy artillery game similar to Worms";
65 homepage = "https://hedgewars.org/";
66 license = licenses.gpl2Plus;
68 Each player controls a team of several hedgehogs. During the course of
69 the game, players take turns with one of their hedgehogs. They then use
70 whatever tools and weapons are available to attack and kill the
71 opponents' hedgehogs, thereby winning the game. Hedgehogs may move
72 around the terrain in a variety of ways, normally by walking and jumping
73 but also by using particular tools such as the "Rope" or "Parachute", to
74 move to otherwise inaccessible areas. Each turn is time-limited to
75 ensure that players do not hold up the game with excessive thinking or
78 A large variety of tools and weapons are available for players during
79 the game: Grenade, Cluster Bomb, Bazooka, UFO, Homing Bee, Shotgun,
80 Desert Eagle, Fire Punch, Baseball Bat, Dynamite, Mine, Rope, Pneumatic
81 pick, Parachute. Most weapons, when used, cause explosions that deform
82 the terrain, removing circular chunks. The landscape is an island
83 floating on a body of water, or a restricted cave with water at the
84 bottom. A hedgehog dies when it enters the water (either by falling off
85 the island, or through a hole in the bottom of it), it is thrown off
86 either side of the arena or when its health is reduced, typically from
87 contact with explosions, to zero (the damage dealt to the attacked
88 hedgehog or hedgehogs after a player's or CPU turn is shown only when
89 all movement on the battlefield has ceased).'';
90 maintainers = with maintainers; [ kragniz fpletz ];
91 broken = stdenv.hostPlatform.isDarwin;
92 platforms = platforms.linux;