2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, SDL, SDL_image, SDL_ttf, SDL_mixer }:
|
2011-12-19 02:13:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "beret-1.2.0";
|
|
|
|
|
|
|
|
buildInputs = [ SDL SDL_image SDL_ttf SDL_mixer ];
|
|
|
|
|
2015-10-11 15:21:43 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${SDL.dev}/include/SDL";
|
2013-09-06 02:47:49 +01:00
|
|
|
NIX_CFLAGS_LINK = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
|
|
|
|
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin
|
|
|
|
"-framework CoreFoundation -framework OpenGL -framework Cocoa";
|
2011-12-19 02:13:38 +00:00
|
|
|
|
2011-12-21 18:18:15 +00:00
|
|
|
patches = [ ./use-home-dir.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2011-12-19 02:13:38 +00:00
|
|
|
sed -i 's@RESOURCE_PATH ""@RESOURCE_PATH "'$out'/share/"@' game.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "https://gitorious.org/beret/beret/archive-tarball/ae029777";
|
2011-12-19 02:13:38 +00:00
|
|
|
name = "beret-1.2.0.tar.gz";
|
2014-12-03 20:54:49 +00:00
|
|
|
sha256 = "1rx9z72id1810fgv8mizk8qxwd1kh5xi07fdhmjc62mh3fn38szc";
|
2011-12-19 02:13:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2011-12-19 02:13:38 +00:00
|
|
|
install -v -m755 beret $out/bin
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share
|
2011-12-19 02:13:38 +00:00
|
|
|
cp -av tahoma.ttf images music rooms sfx $out/share
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2011-12-19 02:13:38 +00:00
|
|
|
description = "A 2D puzzle-platformer game about a scientist with telekinetic abilities";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://kiwisauce.com/beret/";
|
2013-09-06 02:47:49 +01:00
|
|
|
license = licenses.lgpl2;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.all;
|
2015-12-21 11:09:16 +00:00
|
|
|
broken = true; # source won't download, and no replacement is visible
|
2011-12-19 02:13:38 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|