2023-07-15 17:15:38 +00:00
|
|
|
{ lib, mkDerivation, fetchFromGitHub, cmake, qttools, wrapQtAppsHook, qtbase, qtsvg }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "tbe";
|
|
|
|
version = "0.9.3.1";
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kaa-ching";
|
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "1ag2cp346f9bz9qy6za6q54id44d2ypvkyhvnjha14qzzapwaysj";
|
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed '1i#include <vector>' -i src/model/World.h
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# fix translations not building: https://gitlab.kitware.com/cmake/cmake/-/issues/21931
|
|
|
|
substituteInPlace i18n/CMakeLists.txt --replace qt5_create_translation qt_add_translation
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake qttools wrapQtAppsHook ];
|
|
|
|
buildInputs = [ qtbase qtsvg ];
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
make DESTDIR=.. install
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ../usr/games/tbe $out/bin
|
|
|
|
cp -r ../usr/share $out/
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A physics-based game vaguely similar to Incredible Machine";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "tbe";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://the-butterfly-effect.org/";
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|