summary refs log tree commit diff
path: root/pkgs/games/blackshades/default.nix
blob: 608b32764bb95da61b10271a90fc08a4c6969c99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{stdenv, fetchsvn, SDL, libGLU, libGL, openal, libvorbis, freealut, SDL_image}:

stdenv.mkDerivation {
  name = "blackshades-svn-110";
  src = fetchsvn {
    url = svn://svn.icculus.org/blackshades/trunk;
    rev = "110";
    sha256 = "0kbrh1dympk8scjxr6av24qs2bffz44l8qmw2m5gyqf4g3rxf6ra";
  };

  NIX_LDFLAGS = "-lSDL_image";

  buildInputs = [ SDL SDL_image libGLU libGL openal libvorbis freealut ];

  patchPhase = ''
    sed -i -e s,Data/,$out/opt/$name/Data/,g \
      -e s,Data:,$out/opt/$name/Data/,g \
      Source/*.cpp
  '';

  installPhase = ''
    mkdir -p $out/bin $out/opt/$name
    cp objs/blackshades $out/bin
    cp -R Data IF* Readme $out/opt/$name/
  '';

  meta = {
    homepage = http://icculus.org/blackshades/;
    description = "Protect the VIP";
    license = stdenv.lib.licenses.free;
    maintainers = with stdenv.lib.maintainers; [viric];
    platforms = with stdenv.lib.platforms; linux;
  };
}