tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ballerburg: include desktop file and icon
Johannes Arnold
4 years ago
b40971db
e60ece88
+33
-3
1 changed file
expand all
collapse all
unified
split
pkgs
games
ballerburg
default.nix
+33
-3
pkgs/games/ballerburg/default.nix
···
1
-
{ lib, stdenv, fetchurl, cmake, SDL }:
0
0
0
2
3
-
stdenv.mkDerivation rec {
0
0
0
0
0
4
pname = "ballerburg";
5
version = "1.2.0";
6
···
9
sha256 = "sha256-BiX0shPBGA8sshee8rxs41x+mdsrJzBqhpDDic6sYwA=";
10
};
11
12
-
nativeBuildInputs = [ cmake ];
13
14
buildInputs = [ SDL ];
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
15
16
meta = with lib; {
17
description = "Classic cannon combat game";
···
1
+
{ lib, stdenv, fetchurl, cmake, SDL, makeDesktopItem, copyDesktopItems
2
+
, imagemagick }:
3
+
4
+
let
5
6
+
icon = fetchurl {
7
+
url = "https://baller.tuxfamily.org/king.png";
8
+
sha256 = "1xq2h87s648wjpjl72ds3xnnk2jp8ghbkhjzh2g4hpkq2zdz90hy";
9
+
};
10
+
11
+
in stdenv.mkDerivation rec {
12
pname = "ballerburg";
13
version = "1.2.0";
14
···
17
sha256 = "sha256-BiX0shPBGA8sshee8rxs41x+mdsrJzBqhpDDic6sYwA=";
18
};
19
20
+
nativeBuildInputs = [ cmake copyDesktopItems imagemagick ];
21
22
buildInputs = [ SDL ];
23
+
24
+
desktopItems = [
25
+
(makeDesktopItem {
26
+
name = "Ballerburg";
27
+
desktopName = "Ballerburg SDL";
28
+
type = "Application";
29
+
exec = "_NET_WM_ICON=ballerburg ballerburg";
30
+
comment = meta.description;
31
+
icon = "ballerburg";
32
+
categories = "Game;";
33
+
})
34
+
];
35
+
36
+
postInstall = ''
37
+
# Generate and install icon files
38
+
for size in 16 32 48 64 72 96 128 192 512 1024; do
39
+
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
40
+
convert ${icon} -sample "$size"x"$size" \
41
+
-background white -gravity south -extent "$size"x"$size" \
42
+
$out/share/icons/hicolor/"$size"x"$size"/apps/ballerburg.png
43
+
done
44
+
'';
45
46
meta = with lib; {
47
description = "Classic cannon combat game";