summary refs log tree commit diff
path: root/pkgs/games/dhewm3/default.nix
blob: 6036d7fabd558bd3c14e8b5bfb4f05af73e02d9e (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
{stdenv, fetchurl, unzip, cmake, SDL, mesa, zlib, libjpeg, libogg, libvorbis
, openalSoft, curl }:

stdenv.mkDerivation rec {
  hash = "92a41322f4aa8bd45395d8088721c9a2bf43c79b";
  name = "dhewm3-20130113-${hash}";
  src = fetchurl {
    url = "https://github.com/dhewm/dhewm3/zipball/${hash}";
    sha256 = "0c17k60xhimpqi1xi9s1l7jbc97pqjnk4lgwyjb0agc3dkr73zwd";
  };

  # Add mesa linking
  patchPhase = ''
    sed -i 's/\<idlib\()\?\)$/idlib GL\1/' CMakeLists.txt
  '';

  unpackPhase = ''
    unzip ${src}
    cd */neo
  '';

  buildInputs = [ unzip cmake SDL mesa zlib libjpeg libogg libvorbis openalSoft
    curl ];

  enableParallelBuilding = true;

  meta = {
    homepage = https://github.com/dhewm/dhewm3;
    description = "Doom 3 port to SDL";
    license = "GPLv3";
  };

}