···11+{ stdenv, SDL, fetchurl, gzip, libvorbis, libmad }:
22+stdenv.mkDerivation rec {
33+ name = "quakespasm-${version}";
44+ majorVersion = "0.92";
55+ version = "${majorVersion}.1";
66+77+ src = fetchurl {
88+ url = "mirror://sourceforge/quakespasm/quakespasm-${version}.tgz";
99+ sha256 = "0vhycjg97sn4cd85ph6qz68rplzrm4apijdkrlj9mycnqjv5l100";
1010+ };
1111+1212+ sourceRoot = "${name}/Quake";
1313+1414+ buildInputs = [
1515+ gzip SDL libvorbis libmad
1616+ ];
1717+1818+ preInstall = ''
1919+ mkdir -p "$out/bin"
2020+ substituteInPlace Makefile --replace "/usr/local/games" "$out/bin"
2121+ '';
2222+2323+ enableParallelBuilding = true;
2424+2525+ meta = {
2626+ description = "An engine for iD software's Quake";
2727+ homepage = "http://quakespasm.sourceforge.net/";
2828+ longDescription = ''
2929+ QuakeSpasm is a modern, cross-platform Quake 1 engine based on FitzQuake.
3030+ It includes support for 64 bit CPUs and custom music playback, a new sound driver,
3131+ some graphical niceities, and numerous bug-fixes and other improvements.
3232+ Quakespasm utilizes either the SDL or SDL2 frameworks, so choose which one
3333+ works best for you. SDL is probably less buggy, but SDL2 has nicer features
3434+ and smoother mouse input - though no CD support.
3535+ '';
3636+3737+ platforms = stdenv.lib.platforms.linux;
3838+ maintainers = [ stdenv.lib.maintainers.m3tti ];
3939+ };
4040+}