summary refs log tree commit diff
path: root/pkgs/games/the-butterfly-effect/default.nix
blob: 9cc3bf7149ffa5f6fdf95c85fc55aebe4c7cf04f (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
{ stdenv, fetchgit, qt5, box2d, which, cmake, gettext }:

stdenv.mkDerivation rec {
  pname = "tbe";
  version = "0.9.3.1";

  src = fetchgit {
    url = "https://github.com/kaa-ching/tbe";
    rev = "refs/tags/v${version}";
    sha256 = "1ag2cp346f9bz9qy6za6q54id44d2ypvkyhvnjha14qzzapwaysj";
  };

  postPatch = "sed '1i#include <vector>' -i src/model/World.h";

  buildInputs = [
    qt5.qtbase qt5.qtsvg qt5.qttranslations box2d which cmake
    gettext
  ];
  enableParallelBuilding = true;

  installPhase = ''
    make DESTDIR=.. install
    mkdir -p $out/bin
    cp ../usr/games/tbe $out/bin
    cp -r ../usr/share $out/
  '';

  meta = with stdenv.lib; {
    description = "A physics-based game vaguely similar to Incredible Machine";
    homepage = http://the-butterfly-effect.org/;
    maintainers = [ maintainers.raskin ];
    platforms = platforms.linux;
    license = licenses.gpl2;
  };
}