summary refs log tree commit diff
path: root/pkgs/games/scorched3d/default.nix
blob: 63fae5df0fcd1a8e153f3c84a676973733f2dabb (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
38
{stdenv, fetchurl, mesa, openal, autoconf, automake, libtool, freealut, wxGTK,
freetype, fftwSinglePrec, SDL, SDL_net, zlib, libpng, libjpeg, pkgconfig, libogg,
libvorbis} :

stdenv.mkDerivation {
  name = "scorched3d-43.2a";
  src = fetchurl {
    url = mirror://sourceforge/scorched3d/Scorched3D-43.2a-src.tar.gz;
    sha256 = "1hv1mnfb7y51hqmg95l8rx00j66ff32ddxxi5zgfyw92hsvahgxi";
  };

  buildInputs =
    [ mesa openal freealut wxGTK freetype fftwSinglePrec SDL_net zlib libpng libjpeg
    libogg libvorbis ];

  buildNativeInputs = [ pkgconfig ];

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

  sourceRoot = "scorched";

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

# Fake openal-config
  preConfigure =
    ''
      mkdir -pv mybin
      export PATH=$PATH:$PWD/mybin
      echo -e "#!/bin/sh\npkg-config openal \"$@\"" > mybin/openal-config
      chmod +x mybin/openal-config
    '';

  meta = {
    homepage = http://scorched3d.co.uk/;
    description = "3D Clone of the classic Scorched Earth";
    license = "GPLv2+";
  };
}