1 { lib, stdenv, fetchurl, cmake, SDL, makeDesktopItem, copyDesktopItems
7 url = "https://baller.tuxfamily.org/king.png";
8 sha256 = "1xq2h87s648wjpjl72ds3xnnk2jp8ghbkhjzh2g4hpkq2zdz90hy";
11 in stdenv.mkDerivation rec {
16 url = "https://download.tuxfamily.org/baller/ballerburg-${version}.tar.gz";
17 sha256 = "sha256-BiX0shPBGA8sshee8rxs41x+mdsrJzBqhpDDic6sYwA=";
20 nativeBuildInputs = [ cmake copyDesktopItems imagemagick ];
22 buildInputs = [ SDL ];
27 desktopName = "Ballerburg SDL";
28 exec = "_NET_WM_ICON=ballerburg ballerburg";
29 comment = meta.description;
31 categories = [ "Game" ];
36 # Generate and install icon files
37 for size in 16 32 48 64 72 96 128 192 512 1024; do
38 mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
39 convert ${icon} -sample "$size"x"$size" \
40 -background white -gravity south -extent "$size"x"$size" \
41 $out/share/icons/hicolor/"$size"x"$size"/apps/ballerburg.png
46 description = "Classic cannon combat game";
48 Two castles, separated by a mountain, try to defeat each other with their cannonballs,
49 either by killing the opponent's king or by weakening the opponent enough so that the king capitulates.'';
50 homepage = "https://baller.tuxfamily.org/";
51 license = licenses.gpl3Plus;
52 maintainers = [ maintainers.j0hax ];
53 platforms = platforms.all;