1 { lib, stdenv, fetchurl, fetchpatch, SDL2, libGL, libpng, libjpeg, SDL2_ttf, libvorbis, gettext
4 stdenv.mkDerivation rec {
8 url = "https://neverball.org/neverball-${version}.tar.gz";
9 sha256 = "184gm36c6p6vaa6gwrfzmfh86klhnb03pl40ahsjsvprlk667zkk";
12 # Pull upstream fix for -fno-common toolchains
13 # https://github.com/Neverball/neverball/pull/198
15 name = "fno-common.patch";
16 url = "https://github.com/Neverball/neverball/commit/a42492b8db06934c7a794630db92e3ff6ebaadaa.patch";
17 sha256 = "0sqyxfwpl4xxra8iz87j5rxzwani16xra2xl4l5z61shvq30308h";
21 buildInputs = [ libpng SDL2 libGL libjpeg SDL2_ttf libvorbis gettext physfs ];
26 sed -i -e 's@\./data@'$out/share/neverball/data@ share/base_config.h Makefile
27 sed -i -e 's@\./locale@'$out/share/neverball/locale@ share/base_config.h Makefile
28 sed -i -e 's@-lvorbisfile@-lvorbisfile -lX11 -lgcc_s@' Makefile
31 # The map generation code requires a writable HOME
32 preConfigure = "export HOME=$TMPDIR";
35 mkdir -p $out/bin $out/share/neverball
36 cp -R data locale $out/share/neverball
42 enableParallelBuilding = true;
45 homepage = "https://neverball.org/";
46 description = "Tilt the floor to roll a ball";
48 maintainers = with lib.maintainers; [viric];
49 platforms = with lib.platforms; linux;