2021-01-15 05:31:39 +01:00
|
|
|
{ lib, stdenv, fetchurl, SDL2, libGL, libpng, libjpeg, SDL2_ttf, libvorbis, gettext
|
2015-07-30 20:20:27 +02:00
|
|
|
, physfs }:
|
2009-03-04 18:28:25 +01:00
|
|
|
|
2009-11-06 20:25:45 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2021-06-22 23:44:58 +02:00
|
|
|
pname = "neverball";
|
|
|
|
version = "1.6.0";
|
2009-03-04 18:28:25 +01:00
|
|
|
src = fetchurl {
|
2021-06-22 23:44:58 +02:00
|
|
|
url = "https://neverball.org/neverball-${version}.tar.gz";
|
2015-07-30 20:20:27 +02:00
|
|
|
sha256 = "184gm36c6p6vaa6gwrfzmfh86klhnb03pl40ahsjsvprlk667zkk";
|
2009-03-04 18:28:25 +01:00
|
|
|
};
|
|
|
|
|
2018-02-24 13:06:44 +01:00
|
|
|
buildInputs = [ libpng SDL2 libGL libjpeg SDL2_ttf libvorbis gettext physfs ];
|
2009-03-04 18:28:25 +01:00
|
|
|
|
2019-07-23 12:32:11 +02:00
|
|
|
dontPatchELF = true;
|
2009-03-04 18:28:25 +01:00
|
|
|
|
|
|
|
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 = {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://neverball.org/";
|
2009-03-04 18:28:25 +01:00
|
|
|
description = "Tilt the floor to roll a ball";
|
|
|
|
license = "GPL";
|
2021-01-15 05:31:39 +01:00
|
|
|
maintainers = with lib.maintainers; [viric];
|
|
|
|
platforms = with lib.platforms; linux;
|
2009-03-04 18:28:25 +01:00
|
|
|
};
|
|
|
|
}
|