summary refs log tree commit diff
path: root/pkgs/games/neverball/default.nix
blob: 1e31ad303870e72739c384b6a5e1033ca2940bb6 (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, SDL, mesa, libpng, libjpeg, SDL_ttf, libvorbis, gettext} :

stdenv.mkDerivation {
  name = "neverball-1.5.1";
  src = fetchurl {
    url = http://neverball.org/neverball-1.5.1.tar.gz;
    sha256 = "0cqi6q829p1wx4471ab74xd7hmcvjg4fvj40rdc3342rvfqpijv5";
  };

  buildInputs = [ SDL mesa libpng libjpeg SDL_ttf libvorbis gettext ];

  dontPatchElf = true;

  patchPhase = ''
    sed -i -e 's@\./data@'$out/data@ share/base_config.h
    sed -i -e 's@\./locale@'$out/locale@ share/base_config.h
    sed -i -e 's@-lvorbisfile@-lvorbisfile -lX11 -lgcc_s@' Makefile
  '';

  installPhase = ''
    ensureDir $out/bin $out
    cp -R data locale $out
    cp neverball $out/bin
    cp neverputt $out/bin
    cp mapc $out/bin
  '';

  meta = {
    homepage = http://neverball.org/;
    description = "Tilt the floor to roll a ball";
    license = "GPL";
  };
}