2011-12-19 03:13:38 +01:00
|
|
|
{ stdenv, fetchurl, SDL, SDL_image, SDL_ttf, SDL_mixer }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "beret-1.2.0";
|
|
|
|
|
|
|
|
buildInputs = [ SDL SDL_image SDL_ttf SDL_mixer ];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-I${SDL}/include/SDL";
|
2013-09-06 03:47:49 +02: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 03:13:38 +01:00
|
|
|
|
2011-12-21 19:18:15 +01:00
|
|
|
patches = [ ./use-home-dir.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2011-12-19 03:13:38 +01:00
|
|
|
sed -i 's@RESOURCE_PATH ""@RESOURCE_PATH "'$out'/share/"@' game.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = https://gitorious.org/beret/beret/archive-tarball/ae029777;
|
|
|
|
name = "beret-1.2.0.tar.gz";
|
|
|
|
sha256 = "0md00ipacvz5mq8q83h7xbzycnwympr06pc1n5c351swjvyw0ysx";
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin
|
2011-12-19 03:13:38 +01:00
|
|
|
install -v -m755 beret $out/bin
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share
|
2011-12-19 03:13:38 +01:00
|
|
|
cp -av tahoma.ttf images music rooms sfx $out/share
|
|
|
|
'';
|
|
|
|
|
2013-09-06 03:47:49 +02:00
|
|
|
meta = with stdenv.lib; {
|
2011-12-19 03:13:38 +01:00
|
|
|
description = "A 2D puzzle-platformer game about a scientist with telekinetic abilities";
|
2013-09-06 03:47:49 +02:00
|
|
|
homepage = http://kiwisauce.com/beret/;
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.all;
|
2011-12-19 03:13:38 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|