diff options
Diffstat (limited to 'nixpkgs/pkgs/games/neverball/default.nix')
-rw-r--r-- | nixpkgs/pkgs/games/neverball/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/neverball/default.nix b/nixpkgs/pkgs/games/neverball/default.nix new file mode 100644 index 000000000000..50f96a7ee2c8 --- /dev/null +++ b/nixpkgs/pkgs/games/neverball/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, SDL2, libGL, libpng, libjpeg, SDL2_ttf, libvorbis, gettext +, physfs }: + +stdenv.mkDerivation rec { + name = "neverball-1.6.0"; + src = fetchurl { + url = "https://neverball.org/${name}.tar.gz"; + sha256 = "184gm36c6p6vaa6gwrfzmfh86klhnb03pl40ahsjsvprlk667zkk"; + }; + + buildInputs = [ libpng SDL2 libGL libjpeg SDL2_ttf libvorbis gettext physfs ]; + + dontPatchElf = true; + + patchPhase = '' + 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 + sed -i -e 's@-lvorbisfile@-lvorbisfile -lX11 -lgcc_s@' Makefile + ''; + + # The map generation code requires a writable HOME + preConfigure = "export HOME=$TMPDIR"; + + installPhase = '' + mkdir -p $out/bin $out/share/neverball + cp -R data locale $out/share/neverball + cp neverball $out/bin + cp neverputt $out/bin + cp mapc $out/bin + ''; + + enableParallelBuilding = true; + + meta = { + homepage = https://neverball.org/; + description = "Tilt the floor to roll a ball"; + license = "GPL"; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; linux; + }; +} |