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