tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
rott: init at 1.1.2
Sander van der Burg
4 years ago
946ad968
25019e66
+60
2 changed files
expand all
collapse all
unified
split
pkgs
games
rott
default.nix
top-level
all-packages.nix
+54
pkgs/games/rott/default.nix
···
1
1
+
{stdenv, lib, fetchurl, SDL, SDL_mixer, makeDesktopItem, copyDesktopItems, runtimeShell, buildShareware ? false}:
2
2
+
3
3
+
stdenv.mkDerivation rec {
4
4
+
pname = "rott";
5
5
+
version = "1.1.2";
6
6
+
7
7
+
src = fetchurl {
8
8
+
url = "https://icculus.org/rott/releases/${pname}-${version}.tar.gz";
9
9
+
sha256 = "1zr7v5dv2iqx40gzxbg8mhac7fxz3kqf28y6ysxv1xhjqgl1c98h";
10
10
+
};
11
11
+
12
12
+
nativeBuildInputs = [ copyDesktopItems ];
13
13
+
buildInputs = [ SDL SDL_mixer ];
14
14
+
15
15
+
preBuild = ''
16
16
+
cd rott
17
17
+
make clean
18
18
+
make SHAREWARE=${if buildShareware then "1" else "0"}
19
19
+
'';
20
20
+
21
21
+
# Include a wrapper script to allow the game to be launched from a user's PATH and load the game data from the user's home directory.
22
22
+
23
23
+
installPhase = ''
24
24
+
mkdir -p $out/bin
25
25
+
cp rott $out/bin
26
26
+
27
27
+
cat > $out/bin/launch-rott <<EOF
28
28
+
#! ${runtimeShell} -e
29
29
+
cd ~/.rott/data
30
30
+
exec $out/bin/rott
31
31
+
EOF
32
32
+
33
33
+
chmod +x $out/bin/launch-rott
34
34
+
35
35
+
runHook postInstall
36
36
+
'';
37
37
+
38
38
+
desktopItems = [
39
39
+
(makeDesktopItem {
40
40
+
name = "rott";
41
41
+
exec = "launch-rott";
42
42
+
desktopName = "Rise of the Triad: ${if buildShareware then "The HUNT Begins" else "Dark War"}";
43
43
+
categories = "Game;";
44
44
+
})
45
45
+
];
46
46
+
47
47
+
meta = with lib; {
48
48
+
description = "SDL port of Rise of the Triad";
49
49
+
homepage = "https://icculus.org/rott/";
50
50
+
license = licenses.gpl2Plus;
51
51
+
maintainers = with maintainers; [ sander ];
52
52
+
platforms = platforms.all;
53
53
+
};
54
54
+
}
+6
pkgs/top-level/all-packages.nix
···
29471
29471
29472
29472
rocksndiamonds = callPackage ../games/rocksndiamonds { };
29473
29473
29474
29474
+
rott = callPackage ../games/rott { };
29475
29475
+
29476
29476
+
rott-shareware = rott.override {
29477
29477
+
buildShareware = true;
29478
29478
+
};
29479
29479
+
29474
29480
rrootage = callPackage ../games/rrootage { };
29475
29481
29476
29482
saga = libsForQt5.callPackage ../applications/gis/saga {