about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/privateer/default.nix
blob: 9fd90945ebad6b1031a50b32cac18ab207227f94 (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
39
40
41
42
43
{ stdenv, fetchsvn, boost, cmake, ffmpeg, freeglut, glib,
  gtk2, libjpeg, libpng, libpthreadstubs, libvorbis, libXau, libXdmcp,
  libXmu, libGLU, libGL, openal, pixman, pkgconfig, python27, SDL }:

stdenv.mkDerivation {
  name = "privateer-1.03";

  src = fetchsvn {
    #url = "mirror://sourceforge/project/privateer/Wing%20Commander%20Privateer/Privateer%20Gemini%20Gold%201.03/PrivateerGold1.03.bz2.bin";
    url = "https://privateer.svn.sourceforge.net/svnroot/privateer/privgold/trunk/engine";
    rev = "294";
    sha256 = "e1759087d4565d3fc95e5c87d0f6ddf36b2cd5befec5695ec56ed5f3cd144c63";
  };

  buildInputs =
    [ boost cmake ffmpeg freeglut glib gtk2 libjpeg libpng
      libpthreadstubs libvorbis libXau libXdmcp libXmu libGLU libGL openal
      pixman pkgconfig python27 SDL ];

  patches = [ ./0001-fix-VSFile-constructor.patch ];

  preConfigure = ''
    NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-2.0)"
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp vegastrike $out/bin
    cp vegaserver $out/bin
  '';

  meta = with stdenv.lib; {
    homepage = "http://privateer.sourceforge.net/";
    description = "Adventure space flight simulation computer game";
    license = licenses.gpl2Plus; # and a special license for art data
    # https://sourceforge.net/p/privateer/code/HEAD/tree/privgold/trunk/data/art-license.txt

    maintainers = with maintainers; [ ];
    platforms = with platforms; linux ++ darwin;
    hydraPlatforms = [];
    broken = true; # it won't build
  };
}