summary refs log tree commit diff
path: root/pkgs/games/scorched3d/default.nix
blob: f64f9e38f009eb1185a7354e1f6205be7b4b3766 (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, fetchurl, mesa, glew, pkgconfig, openalSoft, freealut, wxGTK, libogg
, freetype, libvorbis, fftwSinglePrec, SDL, SDL_net, expat, libjpeg, libpng }:

stdenv.mkDerivation rec {
  version = "44";
  name = "scorched3d-${version}";
  src = fetchurl {
    url = "mirror://sourceforge/scorched3d/Scorched3D-${version}-src.tar.gz";
    sha256 = "1fldi9pn7cz6hc9h70pacgb7sbykzcac44yp3pkhn0qh4axj10qw";
  };

  buildInputs =
    [ mesa glew openalSoft freealut wxGTK libogg freetype libvorbis
      SDL SDL_net expat libjpeg libpng fftwSinglePrec
    ];

  nativeBuildInputs = [ pkgconfig ];

  patches = [ ./file-existence.patch ];

  sourceRoot = "scorched";

  configureFlags = [ "--with-fftw=${fftwSinglePrec}" ];

  NIX_LDFLAGS = [ "-lopenal" ];

  meta = with stdenv.lib; {
    homepage = http://scorched3d.co.uk/;
    description = "3D Clone of the classic Scorched Earth";
    license = licenses.gpl2Plus;
    platforms = platforms.linux; # maybe more
    maintainers = with maintainers; [ abbradar ];
  };
}