nixpkgs/pkgs/games/the-butterfly-effect/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.1 KiB
Nix
Raw Normal View History

2023-06-20 07:50:12 +00:00
{ lib, mkDerivation, fetchFromGitHub, cmake, qttools, wrapQtAppsHook, qtbase, qtsvg }:
2020-05-09 09:59:13 +00:00
mkDerivation rec {
pname = "tbe";
version = "0.9.3.1";
src = fetchFromGitHub {
owner = "kaa-ching";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "1ag2cp346f9bz9qy6za6q54id44d2ypvkyhvnjha14qzzapwaysj";
};
2023-06-20 07:50:12 +00:00
postPatch = ''
sed '1i#include <vector>' -i src/model/World.h
2023-06-20 07:50:12 +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;
installPhase = ''
make DESTDIR=.. install
mkdir -p $out/bin
cp ../usr/games/tbe $out/bin
cp -r ../usr/share $out/
'';
meta = with lib; {
description = "Physics-based game vaguely similar to Incredible Machine";
mainProgram = "tbe";
homepage = "http://the-butterfly-effect.org/";
maintainers = [ maintainers.raskin ];
platforms = platforms.linux;
2024-07-03 09:37:36 +00:00
license = licenses.gpl2Only;
};
}