summary refs log tree commit diff
path: root/pkgs/games/blackshades/default.nix
blob: 263d92dcea635e806283257b2fa03cddac0452c5 (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
35
36
37
{ lib, stdenv, fetchFromSourcehut
, SDL, SDL_image, libGLU, libGL, openal, libvorbis, freealut }:

stdenv.mkDerivation rec {
  pname = "blackshades";
  version = "1.1.1";

  src = fetchFromSourcehut {
    owner = "~cnx";
    repo = pname;
    rev = version;
    sha256 = "1gx43hcqahbd21ib8blhzmsrwqfzx4qy7f10ck0mh2zc4bfihz64";
  };

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

  patchPhase = ''
    sed -i -e s,Data/,$out/share/$pname/,g \
      -e s,Data:,$out/share/$pname/,g \
      src/*.cpp
  '';

  installPhase = ''
    mkdir -p $out/bin $out/share/doc/$pname
    cp build/blackshades $out/bin
    cp -R Data $out/share/$pname
    cp README.md $out/share/doc/$pname
  '';

  meta = {
    homepage = "https://sr.ht/~cnx/blackshades";
    description = "A psychic bodyguard FPS";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ McSinyx viric ];
    platforms = with lib.platforms; linux;
  };
}