{stdenv, fetchurl, SDL, SDL_mixer, libvorbis, mesa, gtk, pkgconfig, nasm, makeDesktopItem}: stdenv.mkDerivation rec { name = "eduke32-1944"; src = fetchurl { url = http://dukeworld.duke4.net/eduke32/synthesis/20110724-1944/eduke32_src_20110724-1944.tar.bz2; sha256 = "0y2y9agydfkdq4krp4lz22br3p23as6hrqhq7l9djw0pm2y76fqh"; }; buildInputs = [ SDL SDL_mixer libvorbis mesa gtk pkgconfig ] ++ stdenv.lib.optional (stdenv.system == "i686-linux") nasm; NIX_CFLAGS_COMPILE = "-I${SDL}/include/SDL"; NIX_LDFLAGS = "-L${SDL}/lib"; desktopItem = makeDesktopItem { name = "eduke32"; exec = "eduke32-wrapper"; comment = "Duke Nukem 3D port"; desktopName = "EDuke32"; genericName = "Duke Nukem 3D port"; categories = "Application;Game;"; }; preConfigure = '' sed -i -e "s|/usr/bin/sdl-config|${SDL}/bin/sdl-config|" build/Makefile.shared ''; buildPhase = '' make OPTLEVEL=0 ''; installPhase = '' # Install binaries ensureDir $out/bin cp eduke32 mapster32 $out/bin # Make wrapper script cat > $out/bin/eduke32-wrapper <