2015-07-30 20:20:27 +02:00
|
|
|
{ stdenv, fetchurl, SDL2, mesa_noglu, libpng, libjpeg, SDL2_ttf, libvorbis, gettext
|
|
|
|
, physfs }:
|
2009-03-04 18:28:25 +01:00
|
|
|
|
2009-11-06 20:25:45 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-07-30 20:20:27 +02:00
|
|
|
name = "neverball-1.6.0";
|
2009-03-04 18:28:25 +01:00
|
|
|
src = fetchurl {
|
2009-11-06 20:25:45 +01:00
|
|
|
url = "http://neverball.org/${name}.tar.gz";
|
2015-07-30 20:20:27 +02:00
|
|
|
sha256 = "184gm36c6p6vaa6gwrfzmfh86klhnb03pl40ahsjsvprlk667zkk";
|
2009-03-04 18:28:25 +01:00
|
|
|
};
|
|
|
|
|
2015-07-30 20:20:27 +02:00
|
|
|
buildInputs = [ libpng SDL2 mesa_noglu libjpeg SDL2_ttf libvorbis gettext physfs ];
|
2009-03-04 18:28:25 +01:00
|
|
|
|
|
|
|
dontPatchElf = true;
|
|
|
|
|
|
|
|
patchPhase = ''
|
2016-05-31 09:18:12 +02:00
|
|
|
sed -i -e 's@\./data@'$out/share/neverball/data@ share/base_config.h Makefile
|
|
|
|
sed -i -e 's@\./locale@'$out/share/neverball/locale@ share/base_config.h Makefile
|
2009-04-14 23:01:23 +02:00
|
|
|
sed -i -e 's@-lvorbisfile@-lvorbisfile -lX11 -lgcc_s@' Makefile
|
2009-03-04 18:28:25 +01:00
|
|
|
'';
|
|
|
|
|
2009-11-08 23:35:19 +01:00
|
|
|
# The map generation code requires a writable HOME
|
|
|
|
preConfigure = "export HOME=$TMPDIR";
|
|
|
|
|
2009-03-04 18:28:25 +01:00
|
|
|
installPhase = ''
|
2016-05-31 09:18:12 +02:00
|
|
|
mkdir -p $out/bin $out/share/neverball
|
|
|
|
cp -R data locale $out/share/neverball
|
2009-03-04 18:28:25 +01:00
|
|
|
cp neverball $out/bin
|
|
|
|
cp neverputt $out/bin
|
|
|
|
cp mapc $out/bin
|
|
|
|
'';
|
|
|
|
|
2016-05-31 09:18:12 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2009-03-04 18:28:25 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://neverball.org/;
|
|
|
|
description = "Tilt the floor to roll a ball";
|
|
|
|
license = "GPL";
|
2011-03-15 17:52:06 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2009-03-04 18:28:25 +01:00
|
|
|
};
|
|
|
|
}
|